win32crypt.CryptDecodeObjectEx

object = CryptDecodeObjectEx(StructType, Encoded , Flags , CertEncodingType , DecodePara )

Decodes ASN encoded data

Parameters

StructType : str/int

An OID identifying the type of data to be decoded, can be either str or int

Encoded : str

String or buffer containing ASN encoded data

Flags=0 : int

Encoding options, can be combination CRYPT_UNICODE_* constants. CRYPT_ENCODE_ALLOC_FLAG is added to flags..

CertEncodingType=X509_ASN_ENCODING combined with PKCS_7_ASN_ENCODING : int

Encoding types

DecodePara=None : object

Not supported, use only None

OID Object returned
szOID_ENHANCED_KEY_USAGESequence of OIDs
X509_ENHANCED_KEY_USAGESequence of OIDs
szOID_KEY_USAGEPyCRYPT_BIT_BLOB
X509_KEY_USAGEPyCRYPT_BIT_BLOB
X509_BITSPyCRYPT_BIT_BLOB
szOID_SUBJECT_ALT_NAMEPyCERT_ALT_NAME_INFO
szOID_SUBJECT_ALT_NAME2PyCERT_ALT_NAME_INFO
szOID_ISSUER_ALT_NAMEPyCERT_ALT_NAME_INFO
szOID_ISSUER_ALT_NAME2PyCERT_ALT_NAME_INFO
szOID_NEXT_UPDATE_LOCATIONPyCERT_ALT_NAME_INFO
X509_ALTERNATE_NAMEPyCERT_ALT_NAME_INFO
X509_NAME_VALUEPyCERT_NAME_VALUE
X509_UNICODE_ANY_STRINGPyCERT_NAME_VALUE
X509_UNICODE_NAME_VALUEPyCERT_NAME_VALUE
X509_NAMEPyCERT_NAME_INFO
X509_UNICODE_NAMEPyCERT_NAME_INFO
szOID_KEY_ATTRIBUTESPyCERT_KEY_ATTRIBUTES_INFO
X509_KEY_ATTRIBUTESPyCERT_KEY_ATTRIBUTES_INFO
szOID_BASIC_CONSTRAINTSPyCERT_BASIC_CONSTRAINTS_INFO
X509_BASIC_CONSTRAINTSPyCERT_BASIC_CONSTRAINTS_INFO
szOID_BASIC_CONSTRAINTS2PyCERT_BASIC_CONSTRAINTS2_INFO
X509_BASIC_CONSTRAINTS2PyCERT_BASIC_CONSTRAINTS2_INFO
szOID_CERT_POLICIESSequence of PyCERT_POLICY_INFO objects
szOID_APPLICATION_CERT_POLICIESSequence of PyCERT_POLICY_INFO objects
X509_CERT_POLICIESSequence of PyCERT_POLICY_INFO objects
szOID_SUBJECT_KEY_IDENTIFIERBinary string containing the key identifier
szOID_AUTHORITY_KEY_IDENTIFIERPyCERT_AUTHORITY_KEY_ID_INFO
X509_AUTHORITY_KEY_IDPyCERT_AUTHORITY_KEY_ID_INFO

Return Value

Type of object returned is dependent on the StructType to be decoded