Conversation
Add a dedicated regression test that locks in the invariant that ECDSA certificate signatures are verified only against the curve declared in the issuer's SubjectPublicKeyInfo, never falling back to trying other curves. The weak multi-try verifier (verify_ecdsa_signature) was already removed in favour of verify_ecdsa_declared_curve; this test proves the try-all path is gone in both directions and rejects genuine wrong-curve keys. Closes #28 Co-authored-by: Ty Schenk <schenkty@users.noreply.github.com>
larseidsvoll
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Test-only regression for #28 after #30 removed the multi-curve try-all verifier. Locks in known-curve-only verification:
- Happy path: each ECDSA cert verifies under its declared curve
- Wrong-curve OID on real key bytes must not verify (both directions) — the case the removed helper would accept
- Unrelated other-curve SPKI rejected (no fallback)
!matches!(..., Ok(true)) is fail-closed (Ok(false) or Err both pass).
Nit (non-blocking): overlaps somewhat with test_ecdsa_verification_requires_declared_curve above; still worth the explicit #28 guard.
Still draft. CI in progress.
Review only — do not bot-merge (Ty lock on node-rs). Humans merge. No @ humans.
|
Security look @ No security issues found.
No HIGH+. No human @. |
Security Audit (cargo audit) failed on a newly published advisory, RUSTSEC-2026-0285: rustls 0.23.40 accepts TLS 1.3 handshake messages across encryption level boundaries (fixed in >=0.23.45). rustls is a transitive dependency (reqwest/hyper-rustls/tokio-rustls/ rustls-platform-verifier). Update the lockfile to rustls 0.23.45, which also bumps aws-lc-rs/aws-lc-sys and rustls-webpki. Verified the client crate still builds and 'cargo audit' now passes. Co-authored-by: Ty Schenk <schenkty@users.noreply.github.com>
|
|
Thanks for the APPROVE. Nit acknowledged — some overlap with |



Problem
Issue #28: remove the weak multi-curve try-all certificate signature verifier. The curve is always known from the issuer SPKI.
Fixes #28.
Status
The weak helper was already removed on
mainin #30 (verify_ecdsa_declared_curveonly). This PR adds a regression test so a try-all fallback cannot return.Tests
test_no_multi_curve_verification_fallback— correct curve verifies; wrong-curve declaration and other-curve keys are rejected with no fallback.Note
Low Risk
Adds tests only; no changes to certificate verification logic in application code.
Overview
Summary
Issue #28: ECDSA cert verification must use only the curve in the issuer SPKI, not a try-all-curves fallback. That weak path was removed on
main(#30). This PR adds a regression test so that behavior cannot return unnoticed.Related Issues
Fixes #28
Changes Made
Testing
From repo root, run the x509 builder tests (or
test_no_multi_curve_verification_fallbackspecifically). Expect pass: own-curve verification succeeds; cross-curve and mis-declared SPKI cases fail verification.Breaking Changes
None
Reviewed by Cursor Bugbot for commit 1b6751b. Configure here.