x509asn1: ASN1tostr() should fail when 'constructed' is set

This is a regression from my refactor in 623c3a8fa0 (#12808)

Follow-up to 623c3a8fa0

Closes #13972
This commit is contained in:
Daniel Stenberg 2024-06-19 09:16:56 +02:00
parent dc497d7b8f
commit cb96ca1b64
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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. */