Synchronise with Unix code
[openssl.git] / apps / CA.com
index f324788eca13bdb2e6e065415ce2564656f6ef5d..a33fe0b7e4dccce41217bf36298f0b5e1aae831b 100644 (file)
@@ -35,6 +35,7 @@ $ REQ    = openssl + " req " + SSLEAY_CONFIG
 $ CA     = openssl + " ca " + SSLEAY_CONFIG
 $ VERIFY = openssl + " verify"
 $ X509   = openssl + " x509"
+$ PKCS12 = openssl + " pkcs12"
 $ echo   = "write sys$Output"
 $!
 $ s = F$PARSE(F$ENVIRONMENT("DEFAULT"),"[]") - "].;"
@@ -121,6 +122,17 @@ $   ENDIF
 $   GOTO opt_loop_continue
 $ ENDIF
 $!
+$ IF (prog_opt .EQS. "-pkcs12")
+$ THEN
+$   i = i + 1
+$   cname = P'i'
+$   IF cname .EQS. "" THEN cname = "My certificate"
+$   PKCS12 -in newcert.pem -inkey newreq.pem -certfile 'CATOP''CACERT -
+          -out newcert.p12 -export -name "''cname'"
+$   RET=$STATUS
+$   exit RET
+$ ENDIF
+$!
 $ IF (prog_opt .EQS. "-xsign")
 $ THEN
 $!