Skip to content

test: add negative cases and fix DER public-key verification#2

Merged
kostiask merged 2 commits intomasterfrom
ci/pr-checks-and-test-hardening
Feb 27, 2026
Merged

test: add negative cases and fix DER public-key verification#2
kostiask merged 2 commits intomasterfrom
ci/pr-checks-and-test-hardening

Conversation

@kostiask
Copy link
Collaborator

Summary

This PR strengthens test coverage for the CLI command flow and fixes a bug in verify when using DER public keys.

What changed

  • Added negative-path tests:
    • generate returns error for invalid base64 entropy.
    • sign returns I/O error for missing secret key/input file.
    • verify returns I/O error for missing public key/signature.
  • Expanded verification matrix:
    • verify_all_algorithms_all_formats now covers both PEM and DER.
  • Fixed DER verification path in verify:
    • corrected extraction/handling of public key bytes from DER SubjectPublicKeyInfo.
    • removed outdated/unused BitString import after refactor.
  • Kept all tests clippy-clean under strict settings (-D warnings).

@kostiask kostiask merged commit 8d67cd3 into master Feb 27, 2026
3 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