Finally got basic x509 certificate parsing/printing implemented (thanks to help from an asn1 py lib)