diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_verify.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_verify.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_verify.c b/src/lib/libcrypto/asn1/a_verify.c index ea937cab3a..3fc79b78f6 100644 --- a/src/lib/libcrypto/asn1/a_verify.c +++ b/src/lib/libcrypto/asn1/a_verify.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_verify.c,v 1.20 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: a_verify.c,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 | * |
| @@ -85,6 +85,13 @@ ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, | |||
| 85 | return -1; | 85 | return -1; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | if (signature->type == V_ASN1_BIT_STRING && signature->flags & 0x7) | ||
| 89 | { | ||
| 90 | ASN1err(ASN1_F_ASN1_VERIFY, | ||
| 91 | ASN1_R_INVALID_BIT_STRING_BITS_LEFT); | ||
| 92 | return -1; | ||
| 93 | } | ||
| 94 | |||
| 88 | EVP_MD_CTX_init(&ctx); | 95 | EVP_MD_CTX_init(&ctx); |
| 89 | 96 | ||
| 90 | /* Convert signature OID into digest and public key OIDs */ | 97 | /* Convert signature OID into digest and public key OIDs */ |
