add CMS SHA1 signing test
authorDr. Stephen Henson <steve@openssl.org>
Tue, 22 Nov 2016 22:07:16 +0000 (22:07 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 25 Nov 2016 20:50:58 +0000 (20:50 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
test/recipes/80-test_cms.t

index 40fcf7c..264c7d6 100644 (file)
@@ -107,6 +107,14 @@ my @smime_pkcs7_tests = (
        "-CAfile", catfile($smdir, "smroot.pem"), "-out", "smtst.txt" ]
     ],
 
+    [ "signed content S/MIME format, RSA key SHA1",
+      [ "-sign", "-in", $smcont, "-md", "sha1",
+       "-certfile", catfile($smdir, "smroot.pem"),
+       "-signer", catfile($smdir, "smrsa1.pem"), "-out", "test.cms" ],
+      [ "-verify", "-in", "test.cms",
+       "-CAfile", catfile($smdir, "smroot.pem"), "-out", "smtst.txt" ]
+    ],
+
     [ "signed content test streaming S/MIME format, 2 DSA and 2 RSA keys",
       [ "-sign", "-in", $smcont, "-nodetach",
        "-signer", catfile($smdir, "smrsa1.pem"),