Add tests for Perl-level API edge cases#196
Draft
toddr-bot wants to merge 1 commit into
Draft
Conversation
Cover four previously untested areas: - new_key_from_parameters() with check => 1 option - use_sslv23_padding() fallback behavior on OpenSSL 3.x - Subclassing through all constructors and operations - Binary payloads with NUL bytes in encrypt/decrypt/sign/verify Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 34 tests covering four previously untested areas of the Perl API layer.
Why
The XS functions are well-tested, but several Perl-level behaviors had no
coverage: the
checkvalidation option, the SSLv23 fallback stub,subclassing through all constructors, and binary data with NUL bytes.
How
New test file
t/perl_api.tcovers:new_key_from_parameters(check => 1)— valid key passes, public key skips checkuse_sslv23_padding()fallback — verifies croak on 3.x, success on pre-3.xgenerate_key,new_private_key,new_public_key,new_key_from_parametersall return correctly blessed subclass objects;encrypt/decrypt/sign/verify work through the subclass
encrypt/decrypt, sign/verify, and private_encrypt/public_decrypt
Testing
All 34 tests pass on OpenSSL 3.5.1. Full existing test suite passes with no regressions.
🤖 Generated with Claude Code
Quality Report
Changes: 1 file changed, 229 insertions(+)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline