Ensure ossl_cms_EncryptedContent_init_bio() reports an error on no OID
authorMatt Caswell <matt@openssl.org>
Tue, 6 Dec 2022 14:51:54 +0000 (14:51 +0000)
committerTomas Mraz <tomas@openssl.org>
Thu, 22 Dec 2022 10:07:07 +0000 (11:07 +0100)
commit1d0fa26428d28339b561d511076aed7276b1aa18
tree273105c0de8ea4eb41bf50f6d245f621cf3c9b84
parente913b911e04a6b276deb7d7553694ae2c1a563cc
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/19920)
crypto/cms/cms_enc.c
crypto/cms/cms_err.c
crypto/err/openssl.txt
include/openssl/cmserr.h