summaryrefslogtreecommitdiffstats
path: root/crypto/objects
diff options
context:
space:
mode:
authorJames Muir <james@openssl.org>2023-10-14 19:36:57 -0400
committerTomas Mraz <tomas@openssl.org>2023-10-18 16:49:11 +0200
commitbd160912dcc5e39bcdc925d9aa6538f20e37ad16 (patch)
tree7af1527a6720cd6e2ce421ab1137d6a8486cf523 /crypto/objects
parenta47fc4ed401da4e2d84e035cc4add566e85b03d0 (diff)
cms encrypt, better OBJ_nid2obj() return check
Fixes #22225 In OBJ_nid2obj(), if the NID does not have an OID, then a pointer to the special "undefined" ASN1_OBJECT is returned. Check for the undefined-ASN1_OBJECT and return an error. Also, add a test for this in 80-test_cms.t. Testing: #!/bin/bash -x shopt -s expand_aliases alias openssl="LD_LIBRARY_PATH=~/git/openssl ~/git/openssl/apps/openssl" echo "This is a confidential message. It should be encrypted." > msg.txt ## this should fail b/c there is no OID for aes-256-ctr openssl cms -encrypt -in msg.txt -aes-256-ctr -out msg.txt.cms -recip demos/cms/signer.pem echo $? Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22392)
Diffstat (limited to 'crypto/objects')
0 files changed, 0 insertions, 0 deletions