diff options
author | Rich Salz <rsalz@openssl.org> | 2017-10-06 11:06:12 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-10-07 11:26:35 -0400 |
commit | fa4dd546c531ba2ec886531aa5adfd480ed2a094 (patch) | |
tree | 5fabd6cb65e4d2801b33607816a265567f9dd883 /apps | |
parent | 6447e8184cf6deca233d38ab3e9c9aa6ba60e9a5 (diff) | |
download | openssl-fa4dd546c531ba2ec886531aa5adfd480ed2a094.tar.gz |
Rewrite some code
Rewrite the -req-nodes flag from CA.pl (idea from Andy)
Rewrite ERR_string_error_n
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4478)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/CA.pl.in | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/CA.pl.in b/apps/CA.pl.in index ddbc70d710..b5c4f59446 100644 --- a/apps/CA.pl.in +++ b/apps/CA.pl.in @@ -127,13 +127,9 @@ if ($WHAT eq '-newcert' ) { # create a pre-certificate $RET = run("$REQ -x509 -precert -keyout $NEWKEY -out $NEWCERT $DAYS"); print "Pre-cert is in $NEWCERT, private key is in $NEWKEY\n" if $RET == 0; -} elsif ($WHAT eq '-newreq' ) { +} elsif ($WHAT =~ /\-newreq(\-nodes)?/ ) { # create a certificate request - $RET = run("$REQ -new -keyout $NEWKEY -out $NEWREQ $DAYS $EXTRA{req}"); - print "Request is in $NEWREQ, private key is in $NEWKEY\n" if $RET == 0; -} elsif ($WHAT eq '-newreq-nodes' ) { - # create a certificate request - $RET = run("$REQ -new -nodes -keyout $NEWKEY -out $NEWREQ $DAYS $EXTRA{req}"); + $RET = run("$REQ -new $1 -keyout $NEWKEY -out $NEWREQ $DAYS $EXTRA{req}"); print "Request is in $NEWREQ, private key is in $NEWKEY\n" if $RET == 0; } elsif ($WHAT eq '-newca' ) { # create the directory hierarchy |