summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ts
diff options
context:
space:
mode:
authormiod <>2015-07-19 18:25:59 +0000
committermiod <>2015-07-19 18:25:59 +0000
commite5955381f2756ed7dfa9d95684f7bce72885cbd0 (patch)
treee7e2277b99a4664031d84c7631692bf4877f5ad0 /src/lib/libcrypto/ts
parent434ae239dcf64cf56b6f17edb0168de9e7c1a70b (diff)
downloadopenbsd-e5955381f2756ed7dfa9d95684f7bce72885cbd0.tar.gz
openbsd-e5955381f2756ed7dfa9d95684f7bce72885cbd0.tar.bz2
openbsd-e5955381f2756ed7dfa9d95684f7bce72885cbd0.zip
Verify ASN1 objects types before attempting to access them as a particular
type. ok guenther@ doug@
Diffstat (limited to 'src/lib/libcrypto/ts')
-rw-r--r--src/lib/libcrypto/ts/ts_rsp_verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ts/ts_rsp_verify.c b/src/lib/libcrypto/ts/ts_rsp_verify.c
index 797877011c..204c6a9df8 100644
--- a/src/lib/libcrypto/ts/ts_rsp_verify.c
+++ b/src/lib/libcrypto/ts/ts_rsp_verify.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts_rsp_verify.c,v 1.15 2015/07/19 05:42:55 miod Exp $ */ 1/* $OpenBSD: ts_rsp_verify.c,v 1.16 2015/07/19 18:25:59 miod Exp $ */
2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL
3 * project 2002. 3 * project 2002.
4 */ 4 */
@@ -312,6 +312,8 @@ ESS_get_signing_cert(PKCS7_SIGNER_INFO *si)
312 NID_id_smime_aa_signingCertificate); 312 NID_id_smime_aa_signingCertificate);
313 if (!attr) 313 if (!attr)
314 return NULL; 314 return NULL;
315 if (attr->type != V_ASN1_SEQUENCE)
316 return NULL;
315 p = attr->value.sequence->data; 317 p = attr->value.sequence->data;
316 return d2i_ESS_SIGNING_CERT(NULL, &p, attr->value.sequence->length); 318 return d2i_ESS_SIGNING_CERT(NULL, &p, attr->value.sequence->length);
317} 319}