diff options
author | beck <> | 2015-01-28 04:14:31 +0000 |
---|---|---|
committer | beck <> | 2015-01-28 04:14:31 +0000 |
commit | 36ad7f26648c87c63edaa9659d100b44b14f0ae1 (patch) | |
tree | f7e3e1ca2ec359adbc6581af16b8421550c018d8 /src/lib/libcrypto/x509 | |
parent | c899559ffef49152f98a2504c0b30edb540fb863 (diff) | |
download | openbsd-36ad7f26648c87c63edaa9659d100b44b14f0ae1.tar.gz openbsd-36ad7f26648c87c63edaa9659d100b44b14f0ae1.tar.bz2 openbsd-36ad7f26648c87c63edaa9659d100b44b14f0ae1.zip |
Fix a number of issues relating to algorithms in signatures, Mostly
from OpenSSL with a hint of boring and some things done here. Addresses
CVE-2014-8275 for OpenSSL fully
ok miod@ doug@
Diffstat (limited to 'src/lib/libcrypto/x509')
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x_all.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index e425949675..d67a87df0b 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.20 2014/06/12 15:49:31 deraadt Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.21 2015/01/28 04:14:31 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -758,6 +758,7 @@ int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); | |||
758 | void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, | 758 | void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, |
759 | X509_ALGOR *algor); | 759 | X509_ALGOR *algor); |
760 | void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); | 760 | void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); |
761 | int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); | ||
761 | 762 | ||
762 | X509_NAME *X509_NAME_dup(X509_NAME *xn); | 763 | X509_NAME *X509_NAME_dup(X509_NAME *xn); |
763 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); | 764 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); |
diff --git a/src/lib/libcrypto/x509/x_all.c b/src/lib/libcrypto/x509/x_all.c index edb5f520fa..28a81c14a7 100644 --- a/src/lib/libcrypto/x509/x_all.c +++ b/src/lib/libcrypto/x509/x_all.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x_all.c,v 1.18 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: x_all.c,v 1.19 2015/01/28 04:14:31 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -76,6 +76,8 @@ | |||
76 | int | 76 | int |
77 | X509_verify(X509 *a, EVP_PKEY *r) | 77 | X509_verify(X509 *a, EVP_PKEY *r) |
78 | { | 78 | { |
79 | if (X509_ALGOR_cmp(a->sig_alg, a->cert_info->signature)) | ||
80 | return 0; | ||
79 | return(ASN1_item_verify(ASN1_ITEM_rptr(X509_CINF), a->sig_alg, | 81 | return(ASN1_item_verify(ASN1_ITEM_rptr(X509_CINF), a->sig_alg, |
80 | a->signature, a->cert_info, r)); | 82 | a->signature, a->cert_info, r)); |
81 | } | 83 | } |