X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=apps%2FCA.pl.in;h=0e0b7fc0bc9c0a04f063fefeadae61ce415e3e48;hp=7c023ae71f66c5b3ccc91afb1f40341511cb9e1c;hb=90644dd74d5c5262831bb0be73e1226778099924;hpb=75b0edaafa5b4333c0e49831a0bce22339871ace diff --git a/apps/CA.pl.in b/apps/CA.pl.in index 7c023ae71f..0e0b7fc0bc 100644 --- a/apps/CA.pl.in +++ b/apps/CA.pl.in @@ -41,6 +41,7 @@ $REQ="openssl req $SSLEAY_CONFIG"; $CA="openssl ca $SSLEAY_CONFIG"; $VERIFY="openssl verify"; $X509="openssl x509"; +$PKCS12="openssl pkcs12"; $CATOP="./demoCA"; $CAKEY="cakey.pem"; @@ -99,6 +100,14 @@ foreach (@ARGV) { $RET=$?; } } + } elsif (/^-pkcs12$/) { + my $cname = $ARGV[1]; + $cname = "My Certificate" unless defined $cname; + system ("$PKCS12 -in newcert.pem -inkey newreq.pem " . + "-certfile ${CATOP}/$CACERT -out newcert.p12 " . + "-export -name \"$cname\""); + $RET=$?; + exit $RET; } elsif (/^-xsign$/) { system ("$CA -policy policy_anything -infiles newreq.pem"); $RET=$?;