From: Daniel Stenberg Date: Wed, 19 Jun 2024 07:16:56 +0000 (+0200) Subject: x509asn1: ASN1tostr() should fail when 'constructed' is set X-Git-Tag: curl-8_9_0~221 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cb96ca1b64d08df032b615ff9b429a4761fcc406;p=thirdparty%2Fcurl.git x509asn1: ASN1tostr() should fail when 'constructed' is set This is a regression from my refactor in 623c3a8fa0bdb (#12808) Follow-up to 623c3a8fa0bdb2751f14b37417 Closes #13972 --- diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c index 1252f5e5ce..8aa9504ce3 100644 --- a/lib/vtls/x509asn1.c +++ b/lib/vtls/x509asn1.c @@ -599,7 +599,7 @@ static CURLcode ASN1tostr(struct dynbuf *store, { CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; if(elem->constructed) - return CURLE_OK; /* No conversion of structured elements. */ + return result; /* No conversion of structured elements. */ if(!type) type = elem->tag; /* Type not forced: use element tag as type. */