diff options
| author | miod <> | 2015-07-19 18:25:59 +0000 |
|---|---|---|
| committer | miod <> | 2015-07-19 18:25:59 +0000 |
| commit | 61761e41c7c80fb243bc192e66dd048e359b9347 (patch) | |
| tree | e7e2277b99a4664031d84c7631692bf4877f5ad0 /src/lib/libcrypto/ts | |
| parent | 48fd50bde369b42f678fadef9557080465a7e425 (diff) | |
| download | openbsd-61761e41c7c80fb243bc192e66dd048e359b9347.tar.gz openbsd-61761e41c7c80fb243bc192e66dd048e359b9347.tar.bz2 openbsd-61761e41c7c80fb243bc192e66dd048e359b9347.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.c | 4 |
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 | } |
