summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ts
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-07-19 18:26:00 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-07-19 18:26:00 +0000
commiteafe1f0cacc5cfeb27ada3c8b89411a0a8ad7e29 (patch)
tree543e6d28df1500c9fca23aa107f31d4ebd82af8d /lib/libcrypto/ts
parentb8ced6fbcc8ba749dd1630246443d23f46b7c8ec (diff)
Verify ASN1 objects types before attempting to access them as a particular
type. ok guenther@ doug@
Diffstat (limited to 'lib/libcrypto/ts')
-rw-r--r--lib/libcrypto/ts/ts_rsp_verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcrypto/ts/ts_rsp_verify.c b/lib/libcrypto/ts/ts_rsp_verify.c
index 797877011c2..204c6a9df8b 100644
--- a/lib/libcrypto/ts/ts_rsp_verify.c
+++ b/lib/libcrypto/ts/ts_rsp_verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ts_rsp_verify.c,v 1.15 2015/07/19 05:42:55 miod Exp $ */
+/* $OpenBSD: ts_rsp_verify.c,v 1.16 2015/07/19 18:25:59 miod Exp $ */
/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
* project 2002.
*/
@@ -312,6 +312,8 @@ ESS_get_signing_cert(PKCS7_SIGNER_INFO *si)
NID_id_smime_aa_signingCertificate);
if (!attr)
return NULL;
+ if (attr->type != V_ASN1_SEQUENCE)
+ return NULL;
p = attr->value.sequence->data;
return d2i_ESS_SIGNING_CERT(NULL, &p, attr->value.sequence->length);
}