From c6f4c5c0cdf68bcd32cd85e0f3e962889188f4ab Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 13 Dec 2021 17:58:41 +0000 Subject: Remove the last internal use of d2i_ASN1_BOOLEAN. From Stephen Henson, OpenSSL 564df0dd ok jsing --- src/lib/libcrypto/asn1/asn1_par.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/lib') 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 @@ -/* $OpenBSD: asn1_par.c,v 1.28 2020/01/09 11:27:21 inoguchi Exp $ */ +/* $OpenBSD: asn1_par.c,v 1.29 2021/12/13 17:58:41 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -232,16 +232,12 @@ asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offset, goto end; } } else if (tag == V_ASN1_BOOLEAN) { - int ii; - - opp = op; - ii = d2i_ASN1_BOOLEAN(NULL, &opp, len + hl); - if (ii < 0) { + if (len != 1) { if (BIO_write(bp, "Bad boolean\n", 12) <= 0) goto end; } - BIO_printf(bp, ":%d", ii); + BIO_printf(bp, ":%u", p[0]); } else if (tag == V_ASN1_BMPSTRING) { /* do the BMP thang */ } else if (tag == V_ASN1_OCTET_STRING) { -- cgit v1.2.3-55-g6feb