summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2015-03-04 09:46:48 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-10 10:47:46 +0000
commitf5e4349011bd00aa47d142022dcdd1d1706a9655 (patch)
tree31b2c535de004b08968cfdb57ce085ca3b70eb83 /meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
parent7c504b44ef593f97f5311d0d27f667e85a2eddbb (diff)
downloadpoky-f5e4349011bd00aa47d142022dcdd1d1706a9655.tar.gz
openssl: Upgrade to 1.0.2
Rebased numerous patches removed aarch64 initial work since it's part of upstream now Imported a few additional patches from Debian to support the version-script and blacklist additional bad certificates. (From OE-Core rev: 10b689033551c37d6cafa284d82bdccd43f6113e) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch b/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
new file mode 100644
index 0000000000..0c1a0b651f
--- /dev/null
+++ b/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
@@ -0,0 +1,67 @@
1From: Raphael Geissert <geissert@debian.org>
2Description: make X509_verify_cert indicate that any certificate whose
3 name contains "DigiNotar" is revoked.
4Forwarded: not-needed
5Origin: vendor
6Last-Update: 2011-09-08
7Bug: http://bugs.debian.org/639744
8Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
9Reviewed-by: Dr Stephen N Henson <shenson@drh-consultancy.co.uk>
10
11This is not meant as final patch.
12
13Upstream-Status: Backport [debian]
14
15
16Index: openssl-1.0.2/crypto/x509/x509_vfy.c
17===================================================================
18--- openssl-1.0.2.orig/crypto/x509/x509_vfy.c
19+++ openssl-1.0.2/crypto/x509/x509_vfy.c
20@@ -119,6 +119,7 @@ static int check_trust(X509_STORE_CTX *c
21 static int check_revocation(X509_STORE_CTX *ctx);
22 static int check_cert(X509_STORE_CTX *ctx);
23 static int check_policy(X509_STORE_CTX *ctx);
24+static int check_ca_blacklist(X509_STORE_CTX *ctx);
25
26 static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
27 unsigned int *preasons, X509_CRL *crl, X509 *x);
28@@ -438,6 +439,9 @@ int X509_verify_cert(X509_STORE_CTX *ctx
29 if (!ok)
30 goto end;
31
32+ ok = check_ca_blacklist(ctx);
33+ if(!ok) goto end;
34+
35 #ifndef OPENSSL_NO_RFC3779
36 /* RFC 3779 path validation, now that CRL check has been done */
37 ok = v3_asid_validate_path(ctx);
38@@ -938,6 +942,29 @@ static int check_crl_time(X509_STORE_CTX
39 return 1;
40 }
41
42+static int check_ca_blacklist(X509_STORE_CTX *ctx)
43+ {
44+ X509 *x;
45+ int i;
46+ /* Check all certificates against the blacklist */
47+ for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
48+ {
49+ x = sk_X509_value(ctx->chain, i);
50+ /* Mark DigiNotar certificates as revoked, no matter
51+ * where in the chain they are.
52+ */
53+ if (x->name && strstr(x->name, "DigiNotar"))
54+ {
55+ ctx->error = X509_V_ERR_CERT_REVOKED;
56+ ctx->error_depth = i;
57+ ctx->current_cert = x;
58+ if (!ctx->verify_cb(0,ctx))
59+ return 0;
60+ }
61+ }
62+ return 1;
63+ }
64+
65 static int get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
66 X509 **pissuer, int *pscore, unsigned int *preasons,
67 STACK_OF(X509_CRL) *crls)