aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-01-08 22:40:39 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-01-08 22:40:39 +0000
commitc6485458b37e3f0f5d1c69c0452e4551ac3b1824 (patch)
treec2b36ecba3cb850d324786e97809c541cb5c2d5a /crypto/x509
parent58ab7656b2c140e06d60a7831a9f5b6e1ddc2fe5 (diff)
downloadsrc-c6485458b37e3f0f5d1c69c0452e4551ac3b1824.tar.gz
src-c6485458b37e3f0f5d1c69c0452e4551ac3b1824.zip
Import OpenSSL 1.0.1k.vendor/openssl/1.0.1k
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=276856 svn path=/vendor-crypto/openssl/1.0.1k/; revision=276858; tag=vendor/openssl/1.0.1k
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509.h1
-rw-r--r--crypto/x509/x509_vpm.c2
-rw-r--r--crypto/x509/x_all.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h
index 092dd7450d3b..ed767f84dd23 100644
--- a/crypto/x509/x509.h
+++ b/crypto/x509/x509.h
@@ -768,6 +768,7 @@ int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval);
void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
X509_ALGOR *algor);
void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
+int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
X509_NAME *X509_NAME_dup(X509_NAME *xn);
X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c
index dfd89d89faf0..ba546bd1fabf 100644
--- a/crypto/x509/x509_vpm.c
+++ b/crypto/x509/x509_vpm.c
@@ -89,6 +89,8 @@ X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void)
{
X509_VERIFY_PARAM *param;
param = OPENSSL_malloc(sizeof(X509_VERIFY_PARAM));
+ if (!param)
+ return NULL;
memset(param, 0, sizeof(X509_VERIFY_PARAM));
x509_verify_param_zero(param);
return param;
diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c
index e06602d65abc..fef55f89d9a0 100644
--- a/crypto/x509/x_all.c
+++ b/crypto/x509/x_all.c
@@ -72,6 +72,8 @@
int X509_verify(X509 *a, EVP_PKEY *r)
{
+ if (X509_ALGOR_cmp(a->sig_alg, a->cert_info->signature))
+ return 0;
return(ASN1_item_verify(ASN1_ITEM_rptr(X509_CINF),a->sig_alg,
a->signature,a->cert_info,r));
}