]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
x509asn1: ASN1tostr() should fail when 'constructed' is set
authorDaniel Stenberg <daniel@haxx.se>
Wed, 19 Jun 2024 07:16:56 +0000 (09:16 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 19 Jun 2024 09:23:53 +0000 (11:23 +0200)
This is a regression from my refactor in 623c3a8fa0bdb (#12808)

Follow-up to 623c3a8fa0bdb2751f14b37417

Closes #13972

lib/vtls/x509asn1.c

index 1252f5e5cee1cf9e583b4079a75fe50cf1860757..8aa9504ce30c0770c83229aea1ec22c8031e9a4b 100644 (file)
@@ -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. */