diff options
| author | tb <> | 2021-12-13 17:58:41 +0000 |
|---|---|---|
| committer | tb <> | 2021-12-13 17:58:41 +0000 |
| commit | 0743c8765d7d888788f5102487bbff54a6174fdb (patch) | |
| tree | e5e981c381e3235f8d04446e2a891da69e7f067e /src | |
| parent | ac1c71b43569fd89b5dcd26c7342a618a18dff60 (diff) | |
| download | openbsd-0743c8765d7d888788f5102487bbff54a6174fdb.tar.gz openbsd-0743c8765d7d888788f5102487bbff54a6174fdb.tar.bz2 openbsd-0743c8765d7d888788f5102487bbff54a6174fdb.zip | |
Remove the last internal use of d2i_ASN1_BOOLEAN.
From Stephen Henson, OpenSSL 564df0dd
ok jsing
Diffstat (limited to 'src')
| -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) { |
