From: Tobias Girstmair Date: Tue, 18 Oct 2022 11:23:21 +0000 (+0200) Subject: c_rehash: Fix file extension matching X-Git-Tag: openssl-3.2.0-alpha1~1890 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=706fc5f6ebd63e1fcd18d4764248206ab3c18a0a;p=thirdparty%2Fopenssl.git c_rehash: Fix file extension matching For some reason, parenthesis were added 8 years ago in commit a787c2590e468585a1a19738e0c7f481ec91b762. This essentially removed the \. and $ constructs from the middle branches. Hence a file called e.g. cert.key would accidentally match the (cer) rule. CLA: trivial Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19427) --- diff --git a/tools/c_rehash.in b/tools/c_rehash.in index 343cdc1e757..4dd1b446827 100644 --- a/tools/c_rehash.in +++ b/tools/c_rehash.in @@ -143,7 +143,7 @@ sub hash_dir { } } } - FILE: foreach $fname (grep {/\.(pem)|(crt)|(cer)|(crl)$/} @flist) { + FILE: foreach $fname (grep {/\.(pem|crt|cer|crl)$/} @flist) { # Check to see if certificates and/or CRLs present. my ($cert, $crl) = check_file($fname); if (!$cert && !$crl) {