X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2FCA.pl.in;h=56808de88a5a6b9fe864c1eb4b6a696e3bece3c3;hp=52a97d7345034cb5b0b7ba0f8d3cf6209d9ddb81;hb=1da12e34ed69cec206f3a251a1e62ceeb694a6ea;hpb=9ab6fc5936be62f6fee1c433938eae4c89aa23da diff --git a/apps/CA.pl.in b/apps/CA.pl.in index 52a97d7345..56808de88a 100644 --- a/apps/CA.pl.in +++ b/apps/CA.pl.in @@ -1,4 +1,11 @@ #!{- $config{perl} -} +# Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the OpenSSL license (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + # # Wrapper around the ca to make it easier to use # @@ -120,9 +127,9 @@ if ($WHAT eq '-newcert' ) { close OUT; # ask user for existing CA certificate print "CA certificate filename (or enter to create)\n"; - $FILE = ; - chop $FILE if $FILE; - if ($FILE) { + $FILE = "" unless defined($FILE = ); + $FILE =~ s{\R$}{}; + if ($FILE ne "") { copy_pemfile($FILE,"${CATOP}/private/$CAKEY", "PRIVATE"); copy_pemfile($FILE,"${CATOP}/$CACERT", "CERTIFICATE"); } else {