Skip to content

Commit

Permalink
RT1325,2973: Add more extensions to c_rehash
Browse files Browse the repository at this point in the history
Add .crt/.cer/.crl to the filenames parsed.

I also updated the podpage (since it didn't exist when
this ticket was first created, nor when it was re-created
seven years later).

Reviewed-by: Tim Hudson <[email protected]>
  • Loading branch information
TANABE Hiroyasu authored and Rich Salz committed Aug 31, 2014
1 parent 6019cdd commit 80ec8d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions doc/apps/c_rehash.pod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ B<c_rehash>

=head1 DESCRIPTION

B<c_rehash> scans directories and calculates a hash value of each C<.pem>
B<c_rehash> scans directories and calculates a hash value of each
C<.pem>, C<.crt>, C<.cer>, or C<.crl>
file in the specified directory list and creates symbolic links
for each file, where the name of the link is the hash value.
This utility is useful as many programs that use OpenSSL require
Expand Down Expand Up @@ -42,7 +43,7 @@ incrementing the B<D> value. Duplicates are found by comparing the
full SHA-1 fingerprint. A warning will be displayed if a duplicate
is found.

A warning will also be displayed if there are B<.pem> files that
A warning will also be displayed if there are files that
cannot be parsed as either a certificate or a CRL.

The program uses the B<openssl> program to compute the hashes and
Expand Down
2 changes: 1 addition & 1 deletion tools/c_rehash.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ sub hash_dir {
}
}
closedir DIR;
FILE: foreach $fname (grep {/\.pem$/} @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 80ec8d4

Please sign in to comment.