diff options
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/0004-nedded-for-CVE-2014-8275.patch')
-rw-r--r-- | meta/recipes-connectivity/openssl/openssl/0004-nedded-for-CVE-2014-8275.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/0004-nedded-for-CVE-2014-8275.patch b/meta/recipes-connectivity/openssl/openssl/0004-nedded-for-CVE-2014-8275.patch new file mode 100644 index 0000000000..0ad80ec24b --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/0004-nedded-for-CVE-2014-8275.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 5951cc004b96cd681ffdf39d3fc9238a1ff597ae Mon Sep 17 00:00:00 2001 | ||
2 | From: "Dr. Stephen Henson" <steve@openssl.org> | ||
3 | Date: Sun, 14 Dec 2014 23:14:15 +0000 | ||
4 | Subject: [PATCH] Constify ASN1_TYPE_cmp add X509_ALGOR_cmp. | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Reviewed-by: Emilia Käsper <emilia@openssl.org> | ||
10 | (cherry picked from commit 4c52816d35681c0533c25fdd3abb4b7c6962302d) | ||
11 | |||
12 | Upstream-Status: Backport | ||
13 | |||
14 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
15 | --- | ||
16 | crypto/asn1/a_type.c | 2 +- | ||
17 | crypto/asn1/asn1.h | 2 +- | ||
18 | crypto/asn1/x_algor.c | 11 +++++++++++ | ||
19 | crypto/x509/x509.h | 1 + | ||
20 | 4 files changed, 14 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c | ||
23 | index a45d2f9..5e1bc76 100644 | ||
24 | --- a/crypto/asn1/a_type.c | ||
25 | +++ b/crypto/asn1/a_type.c | ||
26 | @@ -113,7 +113,7 @@ IMPLEMENT_STACK_OF(ASN1_TYPE) | ||
27 | IMPLEMENT_ASN1_SET_OF(ASN1_TYPE) | ||
28 | |||
29 | /* Returns 0 if they are equal, != 0 otherwise. */ | ||
30 | -int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b) | ||
31 | +int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b) | ||
32 | { | ||
33 | int result = -1; | ||
34 | |||
35 | diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h | ||
36 | index 672c97f..3c45d5d 100644 | ||
37 | --- a/crypto/asn1/asn1.h | ||
38 | +++ b/crypto/asn1/asn1.h | ||
39 | @@ -776,7 +776,7 @@ DECLARE_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE) | ||
40 | int ASN1_TYPE_get(ASN1_TYPE *a); | ||
41 | void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value); | ||
42 | int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value); | ||
43 | -int ASN1_TYPE_cmp(ASN1_TYPE *a, ASN1_TYPE *b); | ||
44 | +int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b); | ||
45 | |||
46 | ASN1_OBJECT * ASN1_OBJECT_new(void ); | ||
47 | void ASN1_OBJECT_free(ASN1_OBJECT *a); | ||
48 | diff --git a/crypto/asn1/x_algor.c b/crypto/asn1/x_algor.c | ||
49 | index 274e456..57cc956 100644 | ||
50 | --- a/crypto/asn1/x_algor.c | ||
51 | +++ b/crypto/asn1/x_algor.c | ||
52 | @@ -142,3 +142,14 @@ void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md) | ||
53 | X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL); | ||
54 | |||
55 | } | ||
56 | + | ||
57 | +int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) | ||
58 | + { | ||
59 | + int rv; | ||
60 | + rv = OBJ_cmp(a->algorithm, b->algorithm); | ||
61 | + if (rv) | ||
62 | + return rv; | ||
63 | + if (!a->parameter && !b->parameter) | ||
64 | + return 0; | ||
65 | + return ASN1_TYPE_cmp(a->parameter, b->parameter); | ||
66 | + } | ||
67 | diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h | ||
68 | index 092dd74..ed767f8 100644 | ||
69 | --- a/crypto/x509/x509.h | ||
70 | +++ b/crypto/x509/x509.h | ||
71 | @@ -768,6 +768,7 @@ int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); | ||
72 | void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, | ||
73 | X509_ALGOR *algor); | ||
74 | void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); | ||
75 | +int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); | ||
76 | |||
77 | X509_NAME *X509_NAME_dup(X509_NAME *xn); | ||
78 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); | ||
79 | -- | ||
80 | 1.9.1 | ||
81 | |||