summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2018-04-12 07:50:39 +0200
committerMartin Borg <martin.borg@enea.com>2018-04-25 11:44:00 +0200
commit833374e8e7eb5b9e53117d4c2f966094b7017ecc (patch)
tree8cf86a1f4afbd9b6df499520e4004149ae8c1fb2 /recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
parente391ac7eb18379967c47e9444cc1313eb7dc4c98 (diff)
downloadmeta-el-common-833374e8e7eb5b9e53117d4c2f966094b7017ecc.tar.gz
openssl: update 1.0.2n -> 1.0.2o
OpenSSL security advisory: https://www.openssl.org/news/secadv/20180327.txt Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> Signed-off-by: Martin Borg <martin.borg@enea.com>
Diffstat (limited to 'recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch')
-rw-r--r--recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch b/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
new file mode 100644
index 0000000..3820e3e
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl-1.0.2o/debian/c_rehash-compat.patch
@@ -0,0 +1,71 @@
1From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001
2From: Ludwig Nussel <ludwig.nussel@suse.de>
3Date: Wed, 21 Apr 2010 15:52:10 +0200
4Subject: [PATCH] also create old hash for compatibility
5
6Upstream-Status: Backport [debian]
7
8Index: openssl-1.0.2n/tools/c_rehash.in
9===================================================================
10--- openssl-1.0.2n.orig/tools/c_rehash.in
11+++ openssl-1.0.2n/tools/c_rehash.in
12@@ -8,8 +8,6 @@ my $prefix;
13
14 my $openssl = $ENV{OPENSSL} || "openssl";
15 my $pwd;
16-my $x509hash = "-subject_hash";
17-my $crlhash = "-hash";
18 my $verbose = 0;
19 my $symlink_exists=eval {symlink("",""); 1};
20 my $removelinks = 1;
21@@ -18,10 +16,7 @@ my $removelinks = 1;
22 while ( $ARGV[0] =~ /^-/ ) {
23 my $flag = shift @ARGV;
24 last if ( $flag eq '--');
25- if ( $flag eq '-old') {
26- $x509hash = "-subject_hash_old";
27- $crlhash = "-hash_old";
28- } elsif ( $flag eq '-h') {
29+ if ( $flag eq '-h') {
30 help();
31 } elsif ( $flag eq '-n' ) {
32 $removelinks = 0;
33@@ -113,7 +108,9 @@ sub hash_dir {
34 next;
35 }
36 link_hash_cert($fname) if($cert);
37+ link_hash_cert_old($fname) if($cert);
38 link_hash_crl($fname) if($crl);
39+ link_hash_crl_old($fname) if($crl);
40 }
41 }
42
43@@ -146,6 +143,7 @@ sub check_file {
44
45 sub link_hash_cert {
46 my $fname = $_[0];
47+ my $x509hash = $_[1] || '-subject_hash';
48 $fname =~ s/'/'\\''/g;
49 my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`;
50 chomp $hash;
51@@ -177,10 +175,20 @@ sub link_hash_cert {
52 $hashlist{$hash} = $fprint;
53 }
54
55+sub link_hash_cert_old {
56+ link_hash_cert($_[0], '-subject_hash_old');
57+}
58+
59+sub link_hash_crl_old {
60+ link_hash_crl($_[0], '-hash_old');
61+}
62+
63+
64 # Same as above except for a CRL. CRL links are of the form <hash>.r<n>
65
66 sub link_hash_crl {
67 my $fname = $_[0];
68+ my $crlhash = $_[1] || "-hash";
69 $fname =~ s/'/'\\''/g;
70 my ($hash, $fprint) = `"$openssl" crl $crlhash -fingerprint -noout -in '$fname'`;
71 chomp $hash;