Skip to content

Set label and ID on PKCS11 EC public key#10954

Open
aidangarske wants to merge 1 commit into
wolfSSL:masterfrom
aidangarske:pkcs11-ecc-pubkey-label
Open

Set label and ID on PKCS11 EC public key#10954
aidangarske wants to merge 1 commit into
wolfSSL:masterfrom
aidangarske:pkcs11-ecc-pubkey-label

Conversation

@aidangarske

Copy link
Copy Markdown
Member

Copilot AI review requested due to automatic review settings July 20, 2026 21:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a PKCS#11 ECDSA verification failure when using an EC key generated with a label/ID: the generated public-key object is destroyed after export, so later verification cannot find a token-resident public key by label/ID and returns WC_HW_E.

Changes:

  • Reorders public-key selection in Pkcs11ECDSA_Verify() to prefer creating a session public-key object from the exported ECC point before trying label-based lookup.
  • Adds an explanatory comment documenting why the exported point is preferred in this scenario.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wolfcrypt/src/wc_pkcs11.c Outdated
Comment thread wolfcrypt/src/wc_pkcs11.c Outdated
@aidangarske
aidangarske force-pushed the pkcs11-ecc-pubkey-label branch from 01daa90 to dc491c4 Compare July 20, 2026 21:35
@aidangarske
aidangarske marked this pull request as ready for review July 20, 2026 22:08
@github-actions

Copy link
Copy Markdown

retest this please

@aidangarske

Copy link
Copy Markdown
Member Author

Jenkins retest this please

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.

4 participants