Skip to content

Instantly share code, notes, and snippets.

View fcelda's full-sized avatar

Jan Včelák fcelda

View GitHub Profile
@fcelda
fcelda / knot-remove-delegation.py
Created March 21, 2017 11:44
Prototype script to remove delegation with glue records using libknot control interface
#!/usr/bin/env python3
"""
Prototype script to remove delegation with glue records using libknot control interface.
"""
import libknot.control
# libknot configuration
libknot.control.load_lib("/Users/jvcelak/devel/knot/_build.osx/src/.libs/libknot.dylib")
ctl_socket = "/Users/jvcelak/devel/knot/_server/master/knot.sock"
@fcelda
fcelda / freeotp_yubioauth.py
Last active May 11, 2016 23:26
Yubikey OATH import from FreeOTP
#!/usr/bin/env python3
#
# % adb backup -shared org.fedorahosted.freeotp
# % java -jar abe.all.jar unpack backup.bb backup.tar password
# % # extract tokens.xml from the tar
#
import json
import xml.etree.ElementTree
import base64

Keybase proof

I hereby claim:

  • I am fcelda on github.
  • I am jvcelak (https://keybase.io/jvcelak) on keybase.
  • I have a public key whose fingerprint is E5CC 7F4E A4D8 D9D0 6B9F 2F46 2C81 64BB B9D0 6012

To claim this, I am signing this object:

@fcelda
fcelda / nss-pem-certname-support.patch
Created June 12, 2012 11:50
Patch for Mozilla NSS PEM module adding support for custom certificate nicknames.
diff -uNPrp nss-3.13.4.orig/mozilla/security/nss/lib/ckfw/pem/ckpem.h nss-3.13.4/mozilla/security/nss/lib/ckfw/pem/ckpem.h
--- nss-3.13.4.orig/mozilla/security/nss/lib/ckfw/pem/ckpem.h 2012-04-02 18:27:20.000000000 +0200
+++ nss-3.13.4/mozilla/security/nss/lib/ckfw/pem/ckpem.h 2012-06-12 12:24:28.289901209 +0200
@@ -243,9 +243,11 @@ PRBool pem_ParseString(const char* input
PRInt32* numStrings, char*** returnedstrings);
PRBool pem_FreeParsedStrings(PRInt32 numStrings, char** instrings);
+char * pem_ObjectNickname(char *filename, char *certname);
+
pemInternalObject *