Make sure evil file name characters, like spaces or ampersands (!),
authorRichard Levitte <levitte@openssl.org>
Fri, 17 Aug 2001 04:35:58 +0000 (04:35 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 17 Aug 2001 04:35:58 +0000 (04:35 +0000)
don't disturb the rehashing process.
Spotted and suggested patch from Rudo Thomas <rudo@internet.sk>

tools/c_rehash.in

index 26db899..69da98f 100644 (file)
@@ -100,7 +100,7 @@ sub check_file {
 
 sub link_hash_cert {
                my $fname = $_[0];
-               my ($hash, $fprint) = `$openssl x509 -hash -fingerprint -noout -in $fname`;
+               my ($hash, $fprint) = `$openssl x509 -hash -fingerprint -noout -in "$fname"`;
                chomp $hash;
                chomp $fprint;
                $fprint =~ s/^.*=//;
@@ -130,7 +130,7 @@ sub link_hash_cert {
 
 sub link_hash_crl {
                my $fname = $_[0];
-               my ($hash, $fprint) = `$openssl crl -hash -fingerprint -noout -in $fname`;
+               my ($hash, $fprint) = `$openssl crl -hash -fingerprint -noout -in "$fname"`;
                chomp $hash;
                chomp $fprint;
                $fprint =~ s/^.*=//;