What does HRESULT 0x8009310C (CRYPT_E_ASN1_CHOICE) mean?

 
Previous Next
CRYPT_E_ASN1_BADTAG CRYPT_E_ASN1_RULE

CRYPT_E_ASN1_CHOICE

CHOICE requires one recognizable alternative

CRYPT_E_ASN1_CHOICE means the decoder or encoder could not map a value to one of the alternatives in an ASN.1 CHOICE. Selection is normally determined by a tag or by a discriminator in the native structure. An unknown tag, invalid discriminator, or ambiguous alternatives leave the runtime with no legal branch.

X.509 uses choice-like structures for names, times, and extension-specific values. A producer that writes the payload for one alternative while labeling it as another can create a structurally sized object that still fails at the selection step.

Diagnostic questions

  • Which CHOICE alternatives are defined at the failing field?
  • Does each alternative have a distinct effective tag?
  • Does the native structure's selector match the populated union member?
  • Is the object using an extension added by a schema version the decoder does not know?

References


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