summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/apps/CA.pl.in
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/apps/CA.pl.in')
-rw-r--r--crypto/openssl/apps/CA.pl.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/openssl/apps/CA.pl.in b/crypto/openssl/apps/CA.pl.in
index 8b2ce7e..ae7d9c0 100644
--- a/crypto/openssl/apps/CA.pl.in
+++ b/crypto/openssl/apps/CA.pl.in
@@ -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