diff options
author | tb <> | 2021-12-13 17:58:41 +0000 |
---|---|---|
committer | tb <> | 2021-12-13 17:58:41 +0000 |
commit | c6f4c5c0cdf68bcd32cd85e0f3e962889188f4ab (patch) | |
tree | e5e981c381e3235f8d04446e2a891da69e7f067e /src/lib | |
parent | 25aac5d1fc2e9c4ccd3905a8a524d5b599ded2a5 (diff) | |
download | openbsd-c6f4c5c0cdf68bcd32cd85e0f3e962889188f4ab.tar.gz openbsd-c6f4c5c0cdf68bcd32cd85e0f3e962889188f4ab.tar.bz2 openbsd-c6f4c5c0cdf68bcd32cd85e0f3e962889188f4ab.zip |
Remove the last internal use of d2i_ASN1_BOOLEAN.
From Stephen Henson, OpenSSL 564df0dd
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1_par.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_par.c b/src/lib/libcrypto/asn1/asn1_par.c index 1ec9b1ac6b..af948c5267 100644 --- a/src/lib/libcrypto/asn1/asn1_par.c +++ b/src/lib/libcrypto/asn1/asn1_par.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: asn1_par.c,v 1.28 2020/01/09 11:27:21 inoguchi Exp $ */ | 1 | /* $OpenBSD: asn1_par.c,v 1.29 2021/12/13 17:58:41 tb 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 | * |
@@ -232,16 +232,12 @@ asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offset, | |||
232 | goto end; | 232 | goto end; |
233 | } | 233 | } |
234 | } else if (tag == V_ASN1_BOOLEAN) { | 234 | } else if (tag == V_ASN1_BOOLEAN) { |
235 | int ii; | 235 | if (len != 1) { |
236 | |||
237 | opp = op; | ||
238 | ii = d2i_ASN1_BOOLEAN(NULL, &opp, len + hl); | ||
239 | if (ii < 0) { | ||
240 | if (BIO_write(bp, "Bad boolean\n", | 236 | if (BIO_write(bp, "Bad boolean\n", |
241 | 12) <= 0) | 237 | 12) <= 0) |
242 | goto end; | 238 | goto end; |
243 | } | 239 | } |
244 | BIO_printf(bp, ":%d", ii); | 240 | BIO_printf(bp, ":%u", p[0]); |
245 | } else if (tag == V_ASN1_BMPSTRING) { | 241 | } else if (tag == V_ASN1_BMPSTRING) { |
246 | /* do the BMP thang */ | 242 | /* do the BMP thang */ |
247 | } else if (tag == V_ASN1_OCTET_STRING) { | 243 | } else if (tag == V_ASN1_OCTET_STRING) { |