What does HRESULT 0x8009310D (CRYPT_E_ASN1_RULE) mean?

 
Previous Next
CRYPT_E_ASN1_CHOICE CRYPT_E_ASN1_UTF8

CRYPT_E_ASN1_RULE

ASN.1 defines several incompatible encoding rule families

CRYPT_E_ASN1_RULE indicates an encoding-rule mismatch. ASN.1 values can be represented using BER, CER, DER, PER, OER, and other rule sets. Windows certificate APIs operate on the certificate and message encodings they document; a value encoded with a different rule family cannot be decoded merely because it was generated from the same ASN.1 type definition.

PKIX certificates and CRLs require DER. DER is a constrained subset of BER that chooses one canonical representation. Indefinite lengths, non-minimal encodings, or data produced by a PER/OER codec are therefore not valid certificate DER input.

What to confirm

  • Identify the encoding rules used by the producer.
  • Do not confuse textual PEM armor with the ASN.1 encoding rules inside it.
  • Require DER for X.509 objects where the profile mandates DER.
  • Re-encode from the original semantic structure rather than byte-patching rule differences.

References


Looking for a different code? Search another status or error code.