diff options
author | Cristian Stoica <cristian.stoica@nxp.com> | 2016-01-25 13:33:46 +0200 |
---|---|---|
committer | Zhenhua Luo <zhenhua.luo@nxp.com> | 2016-06-23 10:58:51 +0800 |
commit | 84cb2cc407cf85459fb463be2aabedd4f12ade77 (patch) | |
tree | 5bcdd8c2673052d6c3670b7ef9a48767a8f685b6 /recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch | |
parent | 4cc0cf8255a3726fe3f6cbbe1a877fe2fab7edc6 (diff) | |
download | meta-fsl-ppc-84cb2cc407cf85459fb463be2aabedd4f12ade77.tar.gz |
openssl-qoriq: upgrade to 1.0.2h plus fsl patches
upstream recipe extended with patches from fsl and CIOCHASH feature.
Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch')
-rw-r--r-- | recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch | 62 |
1 files changed, 44 insertions, 18 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch b/recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch index ac1b19b..68e54d5 100644 --- a/recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch +++ b/recipes-connectivity/openssl/openssl-qoriq/debian/c_rehash-compat.patch | |||
@@ -1,38 +1,54 @@ | |||
1 | Upstream-Status: Backport [debian] | ||
2 | |||
3 | From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001 | 1 | From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001 |
4 | From: Ludwig Nussel <ludwig.nussel@suse.de> | 2 | From: Ludwig Nussel <ludwig.nussel@suse.de> |
5 | Date: Wed, 21 Apr 2010 15:52:10 +0200 | 3 | Date: Wed, 21 Apr 2010 15:52:10 +0200 |
6 | Subject: [PATCH] also create old hash for compatibility | 4 | Subject: [PATCH] also create old hash for compatibility |
7 | 5 | ||
8 | --- | 6 | Upstream-Status: Backport [debian] |
9 | tools/c_rehash.in | 8 +++++++- | ||
10 | 1 files changed, 7 insertions(+), 1 deletions(-) | ||
11 | 7 | ||
12 | Index: openssl-1.0.0d/tools/c_rehash.in | 8 | diff --git a/tools/c_rehash.in b/tools/c_rehash.in |
13 | =================================================================== | 9 | index b086ff9..b777d79 100644 |
14 | --- openssl-1.0.0d.orig/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000 | 10 | --- a/tools/c_rehash.in |
15 | +++ openssl-1.0.0d/tools/c_rehash.in 2011-04-13 20:41:28.000000000 +0000 | 11 | +++ b/tools/c_rehash.in |
16 | @@ -86,6 +86,7 @@ | 12 | @@ -8,8 +8,6 @@ my $prefix; |
17 | } | 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; | ||
18 | } | 35 | } |
19 | link_hash_cert($fname) if($cert); | 36 | link_hash_cert($fname) if($cert); |
20 | + link_hash_cert_old($fname) if($cert); | 37 | + link_hash_cert_old($fname) if($cert); |
21 | link_hash_crl($fname) if($crl); | 38 | link_hash_crl($fname) if($crl); |
39 | + link_hash_crl_old($fname) if($crl); | ||
22 | } | 40 | } |
23 | } | 41 | } |
24 | @@ -119,8 +120,9 @@ | 42 | |
43 | @@ -146,6 +143,7 @@ sub check_file { | ||
25 | 44 | ||
26 | sub link_hash_cert { | 45 | sub link_hash_cert { |
27 | my $fname = $_[0]; | 46 | my $fname = $_[0]; |
28 | + my $hashopt = $_[1] || '-subject_hash'; | 47 | + my $x509hash = $_[1] || '-subject_hash'; |
29 | $fname =~ s/'/'\\''/g; | 48 | $fname =~ s/'/'\\''/g; |
30 | - my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in "$fname"`; | 49 | my ($hash, $fprint) = `"$openssl" x509 $x509hash -fingerprint -noout -in "$fname"`; |
31 | + my ($hash, $fprint) = `"$openssl" x509 $hashopt -fingerprint -noout -in "$fname"`; | ||
32 | chomp $hash; | 50 | chomp $hash; |
33 | chomp $fprint; | 51 | @@ -176,11 +174,21 @@ sub link_hash_cert { |
34 | $fprint =~ s/^.*=//; | ||
35 | @@ -150,6 +152,10 @@ | ||
36 | $hashlist{$hash} = $fprint; | 52 | $hashlist{$hash} = $fprint; |
37 | } | 53 | } |
38 | 54 | ||
@@ -40,6 +56,16 @@ Index: openssl-1.0.0d/tools/c_rehash.in | |||
40 | + link_hash_cert($_[0], '-subject_hash_old'); | 56 | + link_hash_cert($_[0], '-subject_hash_old'); |
41 | +} | 57 | +} |
42 | + | 58 | + |
59 | +sub link_hash_crl_old { | ||
60 | + link_hash_crl($_[0], '-hash_old'); | ||
61 | +} | ||
62 | + | ||
63 | + | ||
43 | # Same as above except for a CRL. CRL links are of the form <hash>.r<n> | 64 | # Same as above except for a CRL. CRL links are of the form <hash>.r<n> |
44 | 65 | ||
45 | sub link_hash_crl { | 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; | ||