| Previous | Next |
| CRYPT_E_ASN1_UTF8 | CRYPT_E_ASN1_NYI |
CRYPT_E_ASN1_PDU_TYPE
The top-level object type is not valid
CRYPT_E_ASN1_PDU_TYPE means the encoder or decoder cannot identify the requested protocol data unit. In CryptoAPI, callers select a built-in structure using constants such as X509_CERT or provide an OID that resolves through the cryptographic OID-function registry. An unsupported selector or a registration for the wrong encoding type can fail before input bytes are parsed.
This differs from CRYPT_E_ASN1_BADPDU: a bad PDU type is not recognized as a valid top-level definition, while BADPDU can describe an unsupported operation on a definition that is otherwise known.
What to verify
- Log whether
lpszStructTypeis an integer resource or OID string. - Check the selected certificate/message encoding flags.
- Confirm that any custom OID encoder or decoder is registered for the same function set.
- Use the predefined structure matching the actual outer object.
References
- Microsoft: constants for CryptoAPI encoding and decoding
- Microsoft: CryptDecodeObjectEx structure selection
- Microsoft: CryptEncodeObjectEx structure selection
Looking for a different code? Search another status or error code.
