fix: clear deprecation message for use_sslv23_padding on 3.x#134
Merged
timlegge merged 1 commit intoMar 22, 2026
Merged
Conversation
On OpenSSL 3.x, the XS implementation of use_sslv23_padding() is compiled out by a preprocessor guard (#if OPENSSL_VERSION_NUMBER < 0x30000000L). This left callers with a confusing "Can't locate object method" error instead of a helpful message. Add a Perl-level fallback that croaks with a clear deprecation message explaining SSLv23 padding was removed and suggesting use_pkcs1_oaep_padding() or use_pkcs1_pss_padding() as alternatives. The stub is only installed when the XS function is absent (pre-3.x builds retain the native implementation). Updated padding.t to verify the error message content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
timlegge
approved these changes
Mar 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a Perl-level stub for
use_sslv23_padding()that croaks with a cleardeprecation message on OpenSSL 3.x.
Why
The XS implementation is compiled out by
#if OPENSSL_VERSION_NUMBER < 0x30000000L(RSA.xs:1085-1093). On 3.x, callers get a confusing "Can't locate object method"
error instead of anything actionable.
How
After XSLoader runs, check if
use_sslv23_paddingwas defined by XS. If not,install a Perl sub that croaks with a message explaining the removal and suggesting
use_pkcs1_oaep_padding()oruse_pkcs1_pss_padding()as alternatives.Pre-3.x builds are unaffected — the XS function takes precedence.
Testing
padding.t: added assertion that the error message contains "SSLv23 padding was removed"🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 17 insertions(+), 4 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline