diff --git a/tests/data_files/Makefile b/tests/data_files/Makefile index 80bdd2573..e638cafe6 100644 --- a/tests/data_files/Makefile +++ b/tests/data_files/Makefile @@ -1306,6 +1306,11 @@ pkcs7-rsa-expired.crt: $(FAKETIME) -f -3650d $(OPENSSL) req -x509 -subj="/C=NL/O=PKCS7/CN=PKCS7 Cert Expired" -sha256 -nodes -days 365 -newkey rsa:2048 -keyout pkcs7-rsa-expired.key -out pkcs7-rsa-expired.crt all_final += pkcs7-rsa-expired.crt +# File with an otherwise valid signature signed with an expired cert +pkcs7_data_rsa_expired.der: pkcs7-rsa-expired.key pkcs7-rsa-expired.crt pkcs7_data.bin + $(OPENSSL) smime -sign -binary -in pkcs7_data.bin -out $@ -md sha256 -inkey pkcs7-rsa-expired.key -signer pkcs7-rsa-expired.crt -noattr -outform DER -out $@ +all_final += pkcs7_data_rsa_expired.der + # Convert signing certs to DER for testing PEM-free builds pkcs7-rsa-sha256-1.der: $(pkcs7_test_cert_1) $(OPENSSL) x509 -in pkcs7-rsa-sha256-1.crt -out $@ -outform DER @@ -1315,6 +1320,10 @@ pkcs7-rsa-sha256-2.der: $(pkcs7_test_cert_2) $(OPENSSL) x509 -in pkcs7-rsa-sha256-2.crt -out $@ -outform DER all_final += pkcs7-rsa-sha256-2.der +pkcs7-rsa-expired.der: pkcs7-rsa-expired.crt + $(OPENSSL) x509 -in pkcs7-rsa-expired.crt -out $@ -outform DER +all_final += pkcs7-rsa-expired.der + # pkcs7 signature file over zero-len data pkcs7_zerolendata_detached.der: pkcs7_zerolendata.bin pkcs7-rsa-sha256-1.key pkcs7-rsa-sha256-1.crt $(OPENSSL) smime -sign -md sha256 -nocerts -noattr -in pkcs7_zerolendata.bin -inkey pkcs7-rsa-sha256-1.key -outform DER -binary -signer pkcs7-rsa-sha256-1.crt -out pkcs7_zerolendata_detached.der diff --git a/tests/data_files/pkcs7-rsa-expired.der b/tests/data_files/pkcs7-rsa-expired.der new file mode 100644 index 000000000..508ec5c29 Binary files /dev/null and b/tests/data_files/pkcs7-rsa-expired.der differ diff --git a/tests/data_files/pkcs7_data_rsa_expired.der b/tests/data_files/pkcs7_data_rsa_expired.der new file mode 100644 index 000000000..63af49d6a Binary files /dev/null and b/tests/data_files/pkcs7_data_rsa_expired.der differ