What does HRESULT 0x80092024 (CRYPT_E_NOT_CHAR_STRING) mean?

 
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 dwValueType together with cbData and the calling function.
  • Decode an encoded blob before requesting text conversion.
  • Do not assume pbData is null-terminated when the value is binary.
  • Use CertRDNValueToStr only with a supported RDN string representation.

References


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