| Previous | Next |
| CRYPT_E_OID_FORMAT | CRYPT_E_UNEXPECTED_ENCODING |
CRYPT_E_INVALID_MSG_TYPE
The operation was requested for a CMS message type that does not support it. Signed, enveloped, and other message forms expose different parameters and controls.
What to check for CRYPT_E_INVALID_MSG_TYPE
- Determine the actual message type before calling a type-specific CryptoAPI operation.
- Verify that code handling a signed message is not attempting a decryption-only operation, and vice versa.
- Read message parameters only after the message has been decoded far enough for that information to be available.
Microsoft: CryptMsgOpenToDecode
Diagnostic interpretation
CRYPT_E_INVALID_MSG_TYPE has the HRESULT value 0x80091004. AllStat records the condition as “Invalid cryptographic message type.”.
Evidence to capture
- Capture any IErrorInfo text, activity identifier, event-log entry, and subsystem trace that mentions this result or the crypt / msg / type operation.
- check the documented return contract of the specific API because the same HRESULT can require different recovery in different interfaces.
Retry and recovery
” has changed.
Looking for a different code? Search another status or error code.