Skip to content

Comments

fix(cert): add slot_pubkey when verifying satscard signature#43

Merged
notmandatory merged 1 commit intomasterfrom
fix/cert_verification
Aug 13, 2025
Merged

fix(cert): add slot_pubkey when verifying satscard signature#43
notmandatory merged 1 commit intomasterfrom
fix/cert_verification

Conversation

@notmandatory
Copy link
Member

Description

fixes #42

Fixed Certificate::verify_card_signature by including the slot pubkey in the message digest when verifying a SatsCard.

Fixed Certificate::check_certificate by changing the pubkey hash used in cert chain verification to use pubkey.serialize instead of pubkey.serialize_uncompressed.

Notes to the reviewers

I tested these changes with my TapSigner, SatsCard, and SatsChip cards and they all verify now.

Changelog notice

  • Fix certificate chain verification.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

Also fixed pubkey_hash used in cert chain verification to use
pubkey.serialize instead of pubkey.serialize_uncompressed.
@notmandatory notmandatory self-assigned this Aug 10, 2025
@notmandatory notmandatory added the bug Something isn't working label Aug 10, 2025
@notmandatory notmandatory merged commit 297dd98 into master Aug 13, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI certs command is failing for valid cards

1 participant