Fix return value of the i2d_ASN1_bio_stream() call

If the flags argument does not contain the SMIME_STREAM bit,
the i2d_ASN1_bio_stream() function always returns 1,
ignoring the result of the ASN1_item_i2d_bio() call.

Fix the return value to the result of the ASN1_item_i2d_bio()
call for this case.

CLA: trivial

Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
This commit is contained in:
Andrey Tsygunka 2025-03-20 17:45:23 +03:00
parent 4a1a7fe5ce
commit 0a8e5ea8a8

View file

@ -96,7 +96,7 @@ int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
* internally * internally
*/ */
else else
ASN1_item_i2d_bio(it, out, val); rv = ASN1_item_i2d_bio(it, out, val);
return rv; return rv;
} }