]> granicus.if.org Git - openssl/commitdiff
GH271: Warning on </dev/null to CA.pl
authorRich Salz <rsalz@akamai.com>
Sun, 3 May 2015 12:45:27 +0000 (08:45 -0400)
committerRich Salz <rsalz@openssl.org>
Mon, 4 May 2015 19:07:52 +0000 (15:07 -0400)
If CA.pl is reading from /dev/null, then "chop $FILE" gives a warning.
Sigh.  Have to add "if $FILE".  This just silences a build warning.
Thanks to GitHub user andrejs-igumenovs for help with this.

Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/CA.pl.in

index 9d12a8c28fa70ea2da73bf41850a3488076ab3c2..5c8cdd09f29f1a6862d0d9b241c95363ec036a26 100644 (file)
@@ -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");