From cb96ca1b64d08df032b615ff9b429a4761fcc406 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 19 Jun 2024 09:16:56 +0200 Subject: [PATCH] x509asn1: ASN1tostr() should fail when 'constructed' is set This is a regression from my refactor in 623c3a8fa0bdb (#12808) Follow-up to 623c3a8fa0bdb2751f14b37417 Closes #13972 --- lib/vtls/x509asn1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- 2.47.3