diff options
author | Matt Caswell <matt@openssl.org> | 2022-12-06 14:51:54 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-12-22 11:01:06 +0100 |
commit | bf3f8f2c0ea7bdfb007079aade8e01a06e79874f (patch) | |
tree | e1b956969e065525e371c68db06472b9e505873d /crypto/cms/cms_err.c | |
parent | 0f48050b5a8881870b8e25382f817b3a3dc14f16 (diff) |
Ensure ossl_cms_EncryptedContent_init_bio() reports an error on no OID
If the cipher being used in ossl_cms_EncryptedContent_init_bio() has no
associated OID then we should report an error rather than continuing on
regardless. Continuing on still ends up failing - but later on and with a
more cryptic error message.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19918)
Diffstat (limited to 'crypto/cms/cms_err.c')
-rw-r--r-- | crypto/cms/cms_err.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/cms/cms_err.c b/crypto/cms/cms_err.c index 293b65a1f4..40f79eefa9 100644 --- a/crypto/cms/cms_err.c +++ b/crypto/cms/cms_err.c @@ -140,6 +140,8 @@ static const ERR_STRING_DATA CMS_str_reasons[] = { {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNKNOWN_ID), "unknown id"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM), "unsupported compression algorithm"}, + {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_CONTENT_ENCRYPTION_ALGORITHM), + "unsupported content encryption algorithm"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_CONTENT_TYPE), "unsupported content type"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_ENCRYPTION_TYPE), |