Make sure $fname will not give us any surprises with any funny characters.
authorRichard Levitte <levitte@openssl.org>
Fri, 11 Oct 2002 11:07:32 +0000 (11:07 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 11 Oct 2002 11:07:32 +0000 (11:07 +0000)
PR: 256

tools/c_rehash.in

index 26db8999d8c8bf9173c99f5e29b10cfd87bdd3a5..223066e9d9d5b720fb5cc209ed85f2e8d372298f 100644 (file)
@@ -100,7 +100,8 @@ sub check_file {
 
 sub link_hash_cert {
                my $fname = $_[0];
-               my ($hash, $fprint) = `$openssl x509 -hash -fingerprint -noout -in $fname`;
+               $fname =~ s/'/'\\''/;
+               my ($hash, $fprint) = `$openssl x509 -hash -fingerprint -noout -in '$fname'`;
                chomp $hash;
                chomp $fprint;
                $fprint =~ s/^.*=//;