Fix filename escaping in c_rehash
authorMark <mark@asx.hu>
Wed, 24 Feb 2021 13:14:08 +0000 (14:14 +0100)
committerPauli <ppzgs1@gmail.com>
Fri, 26 Feb 2021 00:03:48 +0000 (10:03 +1000)
CLA: trivial

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14301)

tools/c_rehash.in

index ad72b51cfebde0dc506b93cb8055b8d5b629cfb6..3e2e9c0f52b6fd7692c9aabd263559476360a461 100644 (file)
@@ -161,7 +161,7 @@ sub check_file {
 
 sub link_hash_cert {
                my $fname = $_[0];
-               $fname =~ s/'/'\\''/g;
+               $fname =~ s/\"/\\\"/g;
                my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`;
                chomp $hash;
                chomp $fprint;