]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix return value of the i2d_ASN1_bio_stream() call
authorAndrey Tsygunka <aitsygunka@yandex.ru>
Thu, 20 Mar 2025 14:45:23 +0000 (17:45 +0300)
committerTomas Mraz <tomas@openssl.org>
Wed, 26 Mar 2025 14:27:51 +0000 (15:27 +0100)
commit8d83ebebe662653745b48dfe74e795ea85634dc6
tree77d498f0db9c935c4e7f9137ff88138e71379889
parentd9cd96f16cebc50d359b5da95cbfe875eb01b7a4
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>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27106)

(cherry picked from commit 3edb1f09c62c058edf4039587ef35f6b074e0870)
crypto/asn1/asn_mime.c