[Pkg-openssl-changes] r640 - openssl/trunk/debian/patches
Kurt Roeckx
kroeckx at moszumanska.debian.org
Mon Dec 23 18:31:01 UTC 2013
Author: kroeckx
Date: 2013-12-23 18:31:01 +0000 (Mon, 23 Dec 2013)
New Revision: 640
Removed:
openssl/trunk/debian/patches/c_rehash-multi.patch
Log:
Patch isn't used anymore.
Deleted: openssl/trunk/debian/patches/c_rehash-multi.patch
===================================================================
--- openssl/trunk/debian/patches/c_rehash-multi.patch 2013-12-23 16:58:38 UTC (rev 639)
+++ openssl/trunk/debian/patches/c_rehash-multi.patch 2013-12-23 18:31:01 UTC (rev 640)
@@ -1,86 +0,0 @@
-From: Klaus Ethgen <Klaus at Ethgen.de>
-Subject: Generate hashes for all certs in a file
-Bug: http://bugs.debian.org/628780
-Forwared: no
-
---- a/tools/c_rehash.in
-+++ b/tools/c_rehash.in
-@@ -122,34 +122,50 @@ sub link_hash_cert {
- my $fname = $_[0];
- my $hashopt = $_[1] || '-subject_hash';
- $fname =~ s/'/'\\''/g;
-- my ($hash, $fprint) = `"$openssl" x509 $hashopt -fingerprint -noout -in "$fname"`;
-- chomp $hash;
-- chomp $fprint;
-- $fprint =~ s/^.*=//;
-- $fprint =~ tr/://d;
-- my $suffix = 0;
-- # Search for an unused hash filename
-- while(exists $hashlist{"$hash.$suffix"}) {
-- # Hash matches: if fingerprint matches its a duplicate cert
-- if($hashlist{"$hash.$suffix"} eq $fprint) {
-- print STDERR "WARNING: Skipping duplicate certificate $fname\n";
-- return;
-- }
-- $suffix++;
-- }
-- $hash .= ".$suffix";
-- print "$fname => $hash\n";
-- $symlink_exists=eval {symlink("",""); 1};
-- if ($symlink_exists) {
-- symlink $fname, $hash;
-- } else {
-- open IN,"<$fname" or die "can't open $fname for read";
-- open OUT,">$hash" or die "can't open $hash for write";
-- print OUT <IN>; # does the job for small text files
-- close OUT;
-- close IN;
-- }
-- $hashlist{$hash} = $fprint;
-+ open my $in_fh, '<', $fname or die "can't open $fname for read";
-+ my $cert = eval {local $/ = undef; <$in_fh>};
-+ close $in_fh;
-+ OUTERLOOP:
-+ while ($cert =~ /^(-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----)$/gms)
-+ {
-+ my $part = $1;
-+ my $tfile = `tempfile`;
-+ chomp $tfile;
-+ open my $tfile_fh, '>', $tfile or die "can't open $tfile for write";
-+ print {$tfile_fh} "$part\n";
-+ close $tfile_fh;
-+
-+ my ($hash, $fprint) = `"$openssl" x509 $hashopt -fingerprint -noout -in "$tfile"`;
-+ chomp $hash;
-+ chomp $fprint;
-+ $fprint =~ s/^.*=//;
-+ $fprint =~ tr/://d;
-+ my $suffix = 0;
-+ # Search for an unused hash filename
-+ while(exists $hashlist{"$hash.$suffix"}) {
-+ # Hash matches: if fingerprint matches its a duplicate cert
-+ if($hashlist{"$hash.$suffix"} eq $fprint) {
-+ print STDERR "WARNING: Skipping duplicate certificate $fname\n";
-+ unlink $tfile;
-+ next OUTERLOOP;
-+ }
-+ $suffix++;
-+ }
-+ $hash .= ".$suffix";
-+ print "$fname => $hash\n";
-+ $symlink_exists=eval {symlink("",""); 1};
-+ if ($symlink_exists) {
-+ symlink $fname, $hash;
-+ } else {
-+ open IN,"<$tfile" or die "can't open $tfile for read";
-+ open OUT,">$hash" or die "can't open $hash for write";
-+ print OUT <IN>; # does the job for small text files
-+ close OUT;
-+ close IN;
-+ }
-+ $hashlist{$hash} = $fprint;
-+ unlink $tfile;
-+ } ## end while ($cert =~ /^(-----BEGIN ...
- }
-
- sub link_hash_cert_old {
More information about the Pkg-openssl-changes
mailing list