Skip to content

Commit

Permalink
c_rehash: Fix file extension matching
Browse files Browse the repository at this point in the history
For some reason, parenthesis were added 8 years ago in commit
a787c25. 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 <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #19427)

(cherry picked from commit 706fc5f)
  • Loading branch information
uedvt359 authored and t8m committed Nov 23, 2022
1 parent 1829256 commit d04231c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/c_rehash.in
Expand Up @@ -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) {
Expand Down

0 comments on commit d04231c

Please sign in to comment.