]> granicus.if.org Git - openssl/commitdiff
Add X9.42 DH certificate to S/MIME test
authorDr. Stephen Henson <steve@openssl.org>
Fri, 2 Aug 2013 14:51:46 +0000 (15:51 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 5 Aug 2013 15:23:22 +0000 (16:23 +0100)
test/smime-certs/mksmime-certs.sh
test/smime-certs/smdh.pem [new file with mode: 0644]

index 37c5633dc075eec04990a343d5472555ca0d7882..f01f66427c37411349d55ec14b0f672ae113f4a1 100644 (file)
@@ -57,5 +57,18 @@ CN="Test S/MIME EE EC #2" $OPENSSL req -config ca.cnf -nodes \
        -keyout smec2.pem -out req.pem -newkey ec:ecp2.pem
 $OPENSSL x509 -req -in req.pem -CA smroot.pem -days 3600 \
        -extfile ca.cnf -extensions usr_cert -CAcreateserial >>smec2.pem
+# Create X9.42 DH parameters.
+$OPENSSL genpkey -genparam -algorithm DH -pkeyopt dh_paramgen_type:2 \
+       -out dhp.pem
+# Generate X9.42 DH key.
+$OPENSSL genpkey -paramfile dhp.pem -out smdh.pem
+$OPENSSL pkey -pubout -in smdh.pem -out dhpub.pem
+# Generate dummy request.
+CN="Test S/MIME EE DH #1" $OPENSSL req -config ca.cnf -nodes \
+       -keyout smtmp.pem -out req.pem -newkey rsa:2048
+# Sign request but force public key to DH
+$OPENSSL x509 -req -in req.pem -CA smroot.pem -days 3600 \
+       -force_pubkey dhpub.pem \
+       -extfile ca.cnf -extensions usr_cert -CAcreateserial >>smdh.pem
 # Remove temp files.
-rm -f req.pem ecp.pem ecp2.pem dsap.pem smroot.srl
+rm -f req.pem ecp.pem ecp2.pem dsap.pem dhp.pem dhpub.pem smtmp.pem smroot.srl
diff --git a/test/smime-certs/smdh.pem b/test/smime-certs/smdh.pem
new file mode 100644 (file)
index 0000000..f831b07
--- /dev/null
@@ -0,0 +1,33 @@
+-----BEGIN PRIVATE KEY-----
+MIIBSgIBADCCASsGByqGSM4+AgEwggEeAoGBANQMSgwEcnEZ31kZxa9Ef8qOK/AJ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