~ubuntu-branches/ubuntu/maverick/openssl/maverick

« back to all changes in this revision

Viewing changes to apps/CA.pl

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Martin
  • Date: 2004-12-16 18:41:29 UTC
  • mto: (11.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20041216184129-z7xjkul57mh1jiha
Tags: upstream-0.9.7e
ImportĀ upstreamĀ versionĀ 0.9.7e

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/local/bin/perl
 
1
#!/usr/bin/perl
2
2
#
3
3
# CA - wrapper around ca to make it easier to use ... basically ca requires
4
4
#      some setup stuff to be done before you can use it and this makes
82
82
                mkdir "${CATOP}/crl", $DIRMODE ;
83
83
                mkdir "${CATOP}/newcerts", $DIRMODE;
84
84
                mkdir "${CATOP}/private", $DIRMODE;
85
 
                open OUT, ">${CATOP}/serial";
86
 
                print OUT "01\n";
87
 
                close OUT;
88
85
                open OUT, ">${CATOP}/index.txt";
89
86
                close OUT;
90
87
            }
106
103
                    $RET=$?;
107
104
                }
108
105
            }
 
106
            if (! -f "${CATOP}/serial" ) {
 
107
                system ("$X509 -in ${CATOP}/$CACERT -noout "
 
108
                        . "-next_serial -out ${CATOP}/serial");
 
109
            }
109
110
        } elsif (/^-pkcs12$/) {
110
111
            my $cname = $ARGV[1];
111
112
            $cname = "My Certificate" unless defined $cname;