X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2FCA.com;h=02682e424ab731dfb37c7e7284b5fb9dd28e1054;hb=bf2b87aea3dc6ad8f164685476c9eb25dc3f3534;hp=f324788eca13bdb2e6e065415ce2564656f6ef5d;hpb=7d7d2cbcb02206f3393681f2bce198e11e2e185b;p=oweals%2Fopenssl.git diff --git a/apps/CA.com b/apps/CA.com index f324788eca..02682e424a 100644 --- a/apps/CA.com +++ b/apps/CA.com @@ -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"),"[]") - "].;" @@ -96,10 +97,18 @@ $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.certs] $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.crl] $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.newcerts] $ CREATE /DIR /PROTECTION=OWNER:RWED 'CATOP'.private] +$ $ OPEN /WRITE ser_file 'CATOP']serial. $ WRITE ser_file "01" $ CLOSE ser_file $ APPEND/NEW NL: 'CATOP']index.txt +$ +$ ! The following is to make sure access() doesn't get confused. It +$ ! really needs one file in the directory to give correct answers... +$ COPY NLA0: 'CATOP'.certs].; +$ COPY NLA0: 'CATOP'.crl].; +$ COPY NLA0: 'CATOP'.newcerts].; +$ COPY NLA0: 'CATOP'.private].; $ ENDIF $! $ IF F$SEARCH(CATOP+".private"+CAKEY) .EQS. "" @@ -121,6 +130,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 $!