RT1325,2973: Add more extensions to c_rehash
authorTANABE Hiroyasu <h@cosat.com>
Sat, 30 Aug 2014 21:56:31 +0000 (17:56 -0400)
committerRich Salz <rsalz@openssl.org>
Sun, 31 Aug 2014 04:36:09 +0000 (00:36 -0400)
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 <tjh@openssl.org>
doc/apps/c_rehash.pod
tools/c_rehash.in

index c564e86315529adbd37cff9a26db914d89c7f2b1..9f2a15b736478f113eb27e8d7cef66b770d90882 100644 (file)
@@ -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
@@ -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
index bfc4a69ed4bcd8cb384a9bdc1d445bfcdd9b367c..683b413df26be1eedcd4d1e27e8fd67ed057898d 100644 (file)
@@ -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) {