[openssl-commits] [openssl] master update
Viktor Dukhovni
viktor at openssl.org
Sat Feb 13 07:56:08 UTC 2016
The branch master has been updated
via ce3d25d3e5a7e82fd59fd30dff7acc39baed8b5e (commit)
from e314c340736830a6fc0260cf72cc51ea0c227e9d (commit)
- Log -----------------------------------------------------------------
commit ce3d25d3e5a7e82fd59fd30dff7acc39baed8b5e
Author: Viktor Dukhovni <openssl-users at dukhovni.org>
Date: Sat Feb 13 02:53:13 2016 -0500
Fix some issues near recent chomp changes.
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
apps/CA.pl.in | 6 +++---
crypto/perlasm/x86_64-xlate.pl | 2 +-
util/files.pl | 6 +++---
util/mk1mf.pl | 4 +++-
util/mkfiles.pl | 4 ++--
5 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/apps/CA.pl.in b/apps/CA.pl.in
index fbba457..f5e8e4a 100644
--- a/apps/CA.pl.in
+++ b/apps/CA.pl.in
@@ -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 {
diff --git a/crypto/perlasm/x86_64-xlate.pl b/crypto/perlasm/x86_64-xlate.pl
index a0b3bc0..0a023fb 100755
--- a/crypto/perlasm/x86_64-xlate.pl
+++ b/crypto/perlasm/x86_64-xlate.pl
@@ -850,7 +850,7 @@ ___
OPTION DOTNAME
___
}
-while($line=<>) {
+while(defined($line=<>)) {
$line =~ s|\R$||; # Better chomp
diff --git a/util/files.pl b/util/files.pl
index d984196..32e7125 100755
--- a/util/files.pl
+++ b/util/files.pl
@@ -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 ".")
{
diff --git a/util/mk1mf.pl b/util/mk1mf.pl
index 3a9f0d7..f29e50b 100755
--- a/util/mk1mf.pl
+++ b/util/mk1mf.pl
@@ -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",
diff --git a/util/mkfiles.pl b/util/mkfiles.pl
index 4fbe29a..55dfbc6 100755
--- a/util/mkfiles.pl
+++ b/util/mkfiles.pl
@@ -107,8 +107,8 @@ while (<IN>)
{
$b=$`;
$o.=$b." ";
- $b=<IN>;
- $b =~ s|\R$||;
+ $b = "" unless defined($b = <IN>);
+ $b =~ s{\R$}{};
}
else
{
More information about the openssl-commits
mailing list