From 564df0ddead0fbac0bf2eeec6164a81bc3fa8882 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sat, 14 Mar 2015 18:06:59 +0000 Subject: Remove {i2d,d2i}_ASN1_BOOLEAN Remove {i2d,d2i}_ASN1_BOOLEAN. Rewrite single occurrence of d2i_ASN1_BOOLEAN in asn1_parse2 Reviewed-by: Rich Salz --- crypto/asn1/asn1_par.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crypto/asn1/asn1_par.c') diff --git a/crypto/asn1/asn1_par.c b/crypto/asn1/asn1_par.c index a174dec976..20f3a88b85 100644 --- a/crypto/asn1/asn1_par.c +++ b/crypto/asn1/asn1_par.c @@ -215,15 +215,11 @@ static int asn1_parse2(BIO *bp, const unsigned char **pp, long length, 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