1 Upstream-Status: Backport [debian]
3 Index: openssl-0.9.8k/tools/c_rehash.in
4 ===================================================================
5 --- openssl-0.9.8k.orig/tools/c_rehash.in 2002-10-11 22:31:27.000000000 +0200
6 +++ openssl-0.9.8k/tools/c_rehash.in 2009-07-19 11:36:26.000000000 +0200
11 - FILE: foreach $fname (grep {/\.pem$/} @flist) {
12 + FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
13 # Check to see if certificates and/or CRLs present.
14 my ($cert, $crl) = check_file($fname);
16 - print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
18 + ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
19 + if(!$cert && !$crl) {
20 + print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
24 link_hash_cert($fname) if($cert);
25 link_hash_crl($fname) if($crl);
28 $fname =~ s/'/'\\''/g;
29 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
30 + if(!$hash || !fprint) {
31 + ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;