test: PKCS#1 v1.5 signing regression tests (#146)#148
test: PKCS#1 v1.5 signing regression tests (#146)#148timlegge merged 2 commits intocpan-authors:mainfrom
Conversation
Covers the RSASSA-PKCS1-v1_5 signing workflow used by ACME/Let's Encrypt clients (RS256). Verifies that use_pkcs1_padding() works for sign/verify while remaining blocked for encrypt (Marvin protection). Tests: sign/verify with SHA-256 and SHA-1, cross-padding rejection, Marvin guard for encryption, key PEM round-trip. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@toddr-bot review and fix the debian bullseye test issue |
PR Review — test: PKCS#1 v1.5 signing regression tests (#146)Good regression test coverage for the PKCS#1 v1.5 signing fix. The one blocking issue is the cross-padding rejection test (lines 63-71): on OpenSSL 1.1.1 (Debian bullseye), 🔴 Blocking1. Cross-padding test fails on OpenSSL < 3.x (bullseye) (`t/pkcs1_sign.t`, L63-71)On OpenSSL 1.1.1 (Debian bullseye), both Wrap this block in a SKIP that checks the OpenSSL version, e.g.: SKIP: {
skip "Pre-3.x RSA_verify() ignores padding mode", 1
unless Crypt::OpenSSL::RSA->version() >= 0x30000000;
# ... existing test ...
}Alternatively, if there's no 🟢 Suggestions1. Missing 'use warnings' (`t/pkcs1_sign.t`, L3)Most existing test files in this project include 2. Marvin regex could be more precise (`t/pkcs1_sign.t`, L77)The actual croak message is: Checklist
SummaryGood regression test coverage for the PKCS#1 v1.5 signing fix. The one blocking issue is the cross-padding rejection test (lines 63-71): on OpenSSL 1.1.1 (Debian bullseye), Automated review by Kōan |
The bullseye test failure is in the cross-padding rejection test ( Fix: wrap the cross-padding block in a SKIP: {
skip "Pre-3.x RSA_verify ignores padding mode", 1
unless eval { Crypt::OpenSSL::RSA->can('_openssl_version') && ... };
# existing cross-padding test
}Or probe it dynamically — attempt to detect whether padding differentiation is honored. |
Add version check for OpenSSL to adjust PKCS1 padding usage in tests. In OpenSSL < 3.0 the padding defaults to PKCS1 for RSA_sign
Summary
t/pkcs1_sign.twith 10 tests covering RSASSA-PKCS1-v1_5 signingWhy
Issue #146 reports that ACME/Let's Encrypt clients break because PKCS#1 v1.5 signing was disabled. The code fix exists but there was no dedicated test coverage for the PKCS#1 v1.5 sign/verify workflow. This ensures the fix stays working.
Testing
Covers: sign/verify with SHA-256 (RS256) and SHA-1, cross-padding rejection (PKCS1 sig must not verify with PSS), Marvin guard for encryption, and key PEM round-trip verification.
All 518 tests pass locally (OpenSSL 3.x).
🤖 Generated with Claude Code
Quality Report
Changes: 2 files changed, 99 insertions(+)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline