Skip to content

pkcs7: fix error check of PKCS7_RECIP_INFO_set()#1035

Merged
rhenium merged 1 commit into
ruby:masterfrom
ndossche:clesss-11
Apr 20, 2026
Merged

pkcs7: fix error check of PKCS7_RECIP_INFO_set()#1035
rhenium merged 1 commit into
ruby:masterfrom
ndossche:clesss-11

Conversation

@ndossche
Copy link
Copy Markdown
Contributor

This function actually returns a value <=0 on error, but it is not documented as such.
Example from OpenSSL code [1] and implementation [2] indicate as such.

[1] https://github.com/openssl/openssl/blob/4b8ddae690d6449005e474bfdfe73106d4d6c5ea/crypto/pkcs7/pk7_lib.c#L578
[2] https://github.com/openssl/openssl/blob/4b8ddae690d6449005e474bfdfe73106d4d6c5ea/crypto/pkcs7/pk7_lib.c#L625

This was found by a hybrid static-dynamic analyser that looks for inconsistent handling of error checks in bindings.

@rhenium rhenium merged commit 0e25043 into ruby:master Apr 20, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants