| Previous | Next |
| CRYPT_E_ASN1_BADARGS | CRYPT_E_ASN1_BADTAG |
CRYPT_E_ASN1_BADREAL
ASN.1 REAL has its own wire representation
CRYPT_E_ASN1_BADREAL is specific to the ASN.1 REAL type. X.690 permits binary and character forms plus special encodings, with rules for sign, base, scaling factor, exponent, mantissa, and canonical representation. A byte sequence that resembles a floating-point value in memory is not automatically a valid ASN.1 REAL.
REAL fields are uncommon in ordinary X.509 certificates, so this error can also indicate that the wrong PDU or field schema was selected. Treating arbitrary certificate bytes as a REAL value will fail at the ASN.1 layer before any cryptographic validation.
What to examine
- Confirm that the schema actually declares the field as REAL.
- Inspect the initial contents octet and exponent-length encoding.
- Check canonical restrictions when DER rather than general BER is required.
- Do not substitute an IEEE-754 memory image for an ASN.1 REAL encoding.
References
Looking for a different code? Search another status or error code.