projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have the VMS shared library file names contain the shared version
[openssl.git]
/
apps
/
CA.pl.in
diff --git
a/apps/CA.pl.in
b/apps/CA.pl.in
index a814ebf3c22f464894c42c1622fccafd3ce52a45..0dec24c36f28e6e54414a2bcd48e94189190518d 100644
(file)
--- a/
apps/CA.pl.in
+++ b/
apps/CA.pl.in
@@
-1,8
+1,15
@@
-#!/usr/bin/perl
+#!{- $config{perl} -}
+# Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
#
#
-# Wrapper around the ca to make it easier to use
-# Edit CA.pl.in not CA.pl!
+# Licensed under the OpenSSL license (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+#
+# Wrapper around the ca to make it easier to use
+#
+# {- join("\n# ", @autowarntext) -}
use strict;
use warnings;
use strict;
use warnings;
@@
-16,7
+23,7
@@
if(defined $ENV{'OPENSSL'}) {
my $verbose = 1;
my $verbose = 1;
-my $OPENSSL_CONFIG = $ENV{"OPENSSL_CONFIG"};
+my $OPENSSL_CONFIG = $ENV{"OPENSSL_CONFIG"}
|| ""
;
my $DAYS = "-days 365";
my $CADAYS = "-days 1095"; # 3 years
my $REQ = "$openssl req $OPENSSL_CONFIG";
my $DAYS = "-days 365";
my $CADAYS = "-days 1095"; # 3 years
my $REQ = "$openssl req $OPENSSL_CONFIG";
@@
-38,7
+45,7
@@
my $NEWREQ = "newreq.pem";
my $NEWCERT = "newcert.pem";
my $NEWP12 = "newcert.p12";
my $RET = 0;
my $NEWCERT = "newcert.pem";
my $NEWP12 = "newcert.p12";
my $RET = 0;
-my $WHAT = shift @ARGV;
+my $WHAT = shift @ARGV
|| ""
;
my $FILE;
# See if reason for a CRL entry is valid; exit if not.
my $FILE;
# See if reason for a CRL entry is valid; exit if not.
@@
-89,7
+96,7
@@
sub run
if ( $WHAT =~ /^(-\?|-h|-help)$/ ) {
if ( $WHAT =~ /^(-\?|-h|-help)$/ ) {
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
+ print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-
signcert|-
verify\n";
print STDERR " CA -pkcs12 [certname]\n";
print STDERR " CA -crl|-revoke cert-filename [reason]\n";
exit 0;
print STDERR " CA -pkcs12 [certname]\n";
print STDERR " CA -crl|-revoke cert-filename [reason]\n";
exit 0;
@@
-120,9
+127,9
@@
if ($WHAT eq '-newcert' ) {
close OUT;
# ask user for existing CA certificate
print "CA certificate filename (or enter to create)\n";
close OUT;
# ask user for existing CA certificate
print "CA certificate filename (or enter to create)\n";
- $FILE =
<STDIN>
;
-
chop $FILE if $FILE
;
- if ($FILE) {
+ $FILE =
"" unless defined($FILE = <STDIN>)
;
+
$FILE =~ s{\R$}{}
;
+ if ($FILE
ne ""
) {
copy_pemfile($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
copy_pemfile($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
} else {
copy_pemfile($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
copy_pemfile($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
} else {
@@
-164,7
+171,7
@@
if ($WHAT eq '-newcert' ) {
my @files = @ARGV ? @ARGV : ( $NEWCERT );
my $file;
foreach $file (@files) {
my @files = @ARGV ? @ARGV : ( $NEWCERT );
my $file;
foreach $file (@files) {
- my $status = run("$VERIFY
-CAfile
${CATOP}/$CACERT $file");
+ my $status = run("$VERIFY
\"-CAfile\"
${CATOP}/$CACERT $file");
$RET = $status if $status != 0;
}
} elsif ($WHAT eq '-crl' ) {
$RET = $status if $status != 0;
}
} elsif ($WHAT eq '-crl' ) {