diff options
author | Nick Child <nick.child@ibm.com> | 2023-02-07 19:59:58 +0000 |
---|---|---|
committer | Nick Child <nick.child@ibm.com> | 2023-02-07 20:04:52 +0000 |
commit | 3dafc6c3b3a02bc19bb0fd54dbbd639d1c2ded47 (patch) | |
tree | 9c495604e71949ffd504acd9dc49dbf226f23b41 /tests/data_files/Makefile | |
parent | 50886c25f326e5def34b90c7903c7b61fce6bdb8 (diff) | |
download | mbedtls-3dafc6c3b3a02bc19bb0fd54dbbd639d1c2ded47.zip mbedtls-3dafc6c3b3a02bc19bb0fd54dbbd639d1c2ded47.tar.gz mbedtls-3dafc6c3b3a02bc19bb0fd54dbbd639d1c2ded47.tar.bz2 |
pkcs7: Drop support for signature in contentInfo of signed data
The contentInfo field of PKCS7 Signed Data structures can
optionally contain the content of the signature. Per RFC 2315
it can also contain any of the PKCS7 data types. Add test and
comments making it clear that the current implementation
only supports the DATA content type and the data must be empty.
Return codes should be clear whether content was invalid or
unsupported.
Identification and fix provided by:
- Demi Marie Obenour <demiobenour@gmail.com>
- Dave Rodgman <dave.rodgman@arm.com>
Signed-off-by: Nick Child <nick.child@ibm.com>
Diffstat (limited to 'tests/data_files/Makefile')
-rw-r--r-- | tests/data_files/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/data_files/Makefile b/tests/data_files/Makefile index 14c1744..7121b5b 100644 --- a/tests/data_files/Makefile +++ b/tests/data_files/Makefile @@ -1202,6 +1202,11 @@ pkcs7_data_without_cert_signed.der: $(pkcs7_test_file) $(pkcs7_test_cert_1) $(OPENSSL) smime -sign -binary -in pkcs7_data.bin -out $@ -md sha256 -signer pkcs7-rsa-sha256-1.pem -nocerts -noattr -outform DER -out $@ all_final += pkcs7_data_without_cert_signed.der +# pkcs7 signature file with signature +pkcs7_data_with_signature.der: $(pkcs7_test_file) $(pkcs7_test_cert_1) + $(OPENSSL) smime -sign -binary -in pkcs7_data.bin -out $@ -md sha256 -signer pkcs7-rsa-sha256-1.pem -nocerts -noattr -nodetach -outform DER -out $@ +all_final += pkcs7_data_with_signature.der + # pkcs7 signature file with two signers pkcs7_data_multiple_signed.der: $(pkcs7_test_file) $(pkcs7_test_cert_1) $(pkcs7_test_cert_2) $(OPENSSL) smime -sign -binary -in pkcs7_data.bin -out $@ -md sha256 -signer pkcs7-rsa-sha256-1.pem -signer pkcs7-rsa-sha256-2.pem -nocerts -noattr -outform DER -out $@ |