Skip to content

pkcs7: fix flaky test test_enveloped - #1086

Merged
rhenium merged 1 commit into
ruby:masterfrom
rhenium:ky/pkcs7-test-flaky-enveloped
Jul 28, 2026
Merged

pkcs7: fix flaky test test_enveloped#1086
rhenium merged 1 commit into
ruby:masterfrom
rhenium:ky/pkcs7-test-flaky-enveloped

Conversation

@rhenium

@rhenium rhenium commented Jul 28, 2026

Copy link
Copy Markdown
Member

OpenSSL::PKCS7#decrypt is unreliable when given only a private key and the PKCS#7 structure contains multiple recipients. It may occasionally raise an exception or return garbage data. Update the test to avoid this.

This became much more visible in CI after upgrading to OpenSSL versions released on 2026-06-09, which enable the implicit rejection mechanism for PKCS#1 v1.5 decryption in PKCS#7.

OpenSSL::PKCS7#decrypt is unreliable when given only a private key and
the PKCS#7 structure contains multiple recipients. It may occasionally
raise an exception or return garbage data. Update the test to avoid
this.

This became much more visible in CI after upgrading to OpenSSL versions
released on 2026-06-09, which enable the implicit rejection mechanism
for PKCS#1 v1.5 decryption in PKCS#7.
@rhenium
rhenium merged commit 9796ee8 into ruby:master Jul 28, 2026
47 of 48 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.

1 participant