diff options
| author | Jacques Vidrine <nectar@FreeBSD.org> | 2005-02-25 05:39:05 +0000 |
|---|---|---|
| committer | Jacques Vidrine <nectar@FreeBSD.org> | 2005-02-25 05:39:05 +0000 |
| commit | 6be8ae0724a74a8210e92579a2e3e25fc6a9cb26 (patch) | |
| tree | 4a7be4ade5df61ca3631c0937c1fc399944ea1cc /crypto/openssl/apps/CA.pl | |
| parent | 01c0bb1d8aa44607627bf7edb3feee626044350c (diff) | |
Notes
Diffstat (limited to 'crypto/openssl/apps/CA.pl')
| -rwxr-xr-x | crypto/openssl/apps/CA.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/openssl/apps/CA.pl b/crypto/openssl/apps/CA.pl index 8b2ce7ea42482..a52a0045c1e84 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; |
