summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/CA.pl
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/apps/CA.pl')
-rwxr-xr-xcrypto/openssl/apps/CA.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/openssl/apps/CA.pl b/crypto/openssl/apps/CA.pl
index 8b2ce7e..a52a004 100755
--- a/crypto/openssl/apps/CA.pl
+++ b/crypto/openssl/apps/CA.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/bin/perl
#
# CA - wrapper around ca to make it easier to use ... basically ca requires
# some setup stuff to be done before you can use it and this makes
@@ -82,9 +82,6 @@ foreach (@ARGV) {
mkdir "${CATOP}/crl", $DIRMODE ;
mkdir "${CATOP}/newcerts", $DIRMODE;
mkdir "${CATOP}/private", $DIRMODE;
- open OUT, ">${CATOP}/serial";
- print OUT "01\n";
- close OUT;
open OUT, ">${CATOP}/index.txt";
close OUT;
}
@@ -106,6 +103,10 @@ foreach (@ARGV) {
$RET=$?;
}
}
+ if (! -f "${CATOP}/serial" ) {
+ system ("$X509 -in ${CATOP}/$CACERT -noout "
+ . "-next_serial -out ${CATOP}/serial");
+ }
} elsif (/^-pkcs12$/) {
my $cname = $ARGV[1];
$cname = "My Certificate" unless defined $cname;
OpenPOWER on IntegriCloud