VMS will downcase all command parameters unless they're quoted
[openssl.git] / apps / CA.pl.in
index 9d12a8c28fa70ea2da73bf41850a3488076ab3c2..23e116a5f588873fb3b7a3112778d3fee676f255 100644 (file)
@@ -16,11 +16,11 @@ if(defined $ENV{'OPENSSL'}) {
 
 my $verbose = 1;
 
-my $SSLEAY_CONFIG = $ENV{"SSLEAY_CONFIG"};
+my $OPENSSL_CONFIG = $ENV{"OPENSSL_CONFIG"};
 my $DAYS = "-days 365";
 my $CADAYS = "-days 1095";     # 3 years
-my $REQ = "$openssl req $SSLEAY_CONFIG";
-my $CA = "$openssl ca $SSLEAY_CONFIG";
+my $REQ = "$openssl req $OPENSSL_CONFIG";
+my $CA = "$openssl ca $OPENSSL_CONFIG";
 my $VERIFY = "$openssl verify";
 my $X509 = "$openssl x509";
 my $PKCS12 = "$openssl pkcs12";
@@ -121,7 +121,7 @@ if ($WHAT eq '-newcert' ) {
     # ask user for existing CA certificate
     print "CA certificate filename (or enter to create)\n";
     $FILE = <STDIN>;
-    chop $FILE;
+    chop $FILE if $FILE;
     if ($FILE) {
         copy_pemfile($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
         copy_pemfile($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
@@ -164,7 +164,7 @@ if ($WHAT eq '-newcert' ) {
     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' ) {