提交 ce3d25d3 编写于 作者: V Viktor Dukhovni

Fix some issues near recent chomp changes.

Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 e314c340
......@@ -120,9 +120,9 @@ if ($WHAT eq '-newcert' ) {
close OUT;
# ask user for existing CA certificate
print "CA certificate filename (or enter to create)\n";
$FILE = <STDIN>;
$FILE = s|\R$|| if $FILE;
if ($FILE) {
$FILE = "" unless defined($FILE = <STDIN>);
$FILE =~ s{\R$}{};
if ($FILE ne "") {
copy_pemfile($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
copy_pemfile($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
} else {
......
......@@ -850,7 +850,7 @@ ___
OPTION DOTNAME
___
}
while($line=<>) {
while(defined($line=<>)) {
$line =~ s|\R$||; # Better chomp
......
......@@ -25,8 +25,8 @@ while (<>)
{
$b=$`; # Keep what is before the backslash
$o.=$b." ";
$b=<>;
$b =~ s|\R$||; # Better chomp
$b = "" unless defined($b = <>);
$b =~ s{\R$}{};
}
else
{
......@@ -43,7 +43,7 @@ while (<>)
}
}
$pwd=`pwd`; $pwd =~ s|\R$||;
($pwd=`pwd`) =~ s{\R$}{};
if ($sym{'TOP'} eq ".")
{
......
......@@ -553,8 +553,10 @@ if ($fips)
{
open (IN, "util/fipslib_path.txt") || fipslib_error();
$fipslibdir = <IN>;
$fipslibdir =~ s|\R$||;
close IN;
$fipslibdir = "" unless defined($fipslibdir);
$fipslibdir =~ s{\R$}{};
fipslib_error() if ($fipslibdir eq "");
}
fips_check_files($fipslibdir,
"fipscanister.lib", "fipscanister.lib.sha1",
......
......@@ -107,8 +107,8 @@ while (<IN>)
{
$b=$`;
$o.=$b." ";
$b=<IN>;
$b =~ s|\R$||;
$b = "" unless defined($b = <IN>);
$b =~ s{\R$}{};
}
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册