| Previous | Next |
| CRYPT_E_INVALID_X500_STRING | CRYPT_E_FILERESIZED |
CRYPT_E_NOT_CHAR_STRING
The value type controls how the blob is interpreted
CRYPT_E_NOT_CHAR_STRING indicates that the dwValueType in a CERT_NAME_VALUE is not one of the character-string types expected by the operation. Values such as CERT_RDN_ENCODED_BLOB and CERT_RDN_OCTET_STRING contain binary data and cannot be processed as null-terminated text.
This is not evidence that the bytes are corrupt. The same Value member is a byte-counted blob whose interpretation depends entirely on dwValueType. Passing an encoded ASN.1 object to a function that expects a decoded Unicode or narrow-character string creates a type error even if the underlying object is valid.
What to verify
- Record
dwValueTypetogether withcbDataand the calling function. - Decode an encoded blob before requesting text conversion.
- Do not assume
pbDatais null-terminated when the value is binary. - Use
CertRDNValueToStronly with a supported RDN string representation.
References
- Microsoft: CERT_NAME_VALUE
- Microsoft: CERT_RDN_ATTR and value-type interpretation
- Microsoft: encoding and decoding certificate names
Looking for a different code? Search another status or error code.