Repository navigation
PKCS11: Add support for raw asymmetric authentication - #539
Open
aveenismail wants to merge 9 commits into
Open
aveenismail wants to merge 9 commits into
aveenismail wants to merge 9 commits into
Conversation
aveenismail
force-pushed
the
auth_salt
branch
9 times, most recently
from
August 12, 2026 11:31
e673728 to
11087a9
Compare
aveenismail
force-pushed
the
auth_salt
branch
5 times, most recently
from
August 27, 2026 07:40
a09c24f to
241d8b3
Compare
aveenismail
force-pushed
the
auth_salt
branch
from
September 8, 2026 12:25
0d32766 to
64dd762
Compare
There was a problem hiding this comment.
🟡 Changes recommended
File-backed authentication can bypass PIN protection for unencrypted keys, while CI changes remove key pre-merge validation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds file-backed P-256 authentication keys to PKCS#11 and introduces FIPS-focused CI changes.
Changes:
- Adds
authkey-fileconfiguration and PEM private-key loading. - Clears authentication key material after session creation.
- Adds FIPS workflows while rescheduling existing CI.
File summaries
| File | Description |
|---|---|
pkcs11/yubihsm_pkcs11.h |
Stores authentication key-file mappings. |
pkcs11/yubihsm_pkcs11.c |
Parses mappings and loads raw P-256 keys. |
pkcs11/cmdline.ggo |
Defines the new configuration option. |
.github/workflows/integration_test.yml |
Replaces standard integration coverage with FIPS testing. |
.github/workflows/build_and_test.yml |
Adds a FIPS build and changes triggers. |
.github/workflows/build_and_test_windows.yml |
Reschedules Windows validation. |
.github/workflows/release.yml |
Reschedules release-package validation. |
Review details
Suppressed comments (1)
.github/workflows/integration_test.yml:10
- Commenting out
maindisables the existing Ubuntu/Fedora build, command-line tests, OpenSC tests, and SunPKCS11 matrix. The replacement FIPS job does not run those in-repository suites, so this substantially reduces regression coverage; retain the existing job and add the FIPS job alongside it.
# main:
- Files reviewed: 7/7 changed files
- Comments generated: 9
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return false; | ||
| } | ||
|
|
||
| EVP_PKEY *pkey = PEM_read_bio_PrivateKey(bio, NULL, NULL, pass_cstr); |
| schedule: | ||
| # Run this every wednesday at 3:40. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | ||
| - cron: '40 3 * * 3' | ||
| on: [push, pull_request] |
| yubihsm_pkcs11_authkey_file akf = {0}; | ||
| akf.id = id; | ||
| memcpy(akf.path, path, path_len); | ||
| list_append(&g_ctx.authkey_files, &akf); |
| yrc = yh_create_session_asym(session->slot->connector, key_id, sk_oce, | ||
| sizeof(sk_oce), pk_sd, pk_sd_len, | ||
| &session->slot->device_session); | ||
| insecure_memzero(sk_oce, sizeof(sk_oce)); |
| option "noproxy" - "Comma separated list of hosts ignore proxy for" string optional | ||
| option "timeout" - "Timeout to use for initial connection to connector" int optional default="5" | ||
| option "device-pubkey" - "List of device public keys allowed for asymmetric authentication" string optional multiple | ||
| option "authkey-file" - "Map an authentication key ID to a password-protected file containing the corresponding EC P256 private key, format <4-hex-digit key ID>:<path>" string optional multiple |
Comment on lines
+6608
to
+6611
| const char *authkey_file = find_authkey_file(key_id); | ||
| if (authkey_file != NULL) { | ||
| if (load_ec_p256_privkey_from_file(authkey_file, pPin, ulPinLen, sk_oce, | ||
| sizeof(sk_oce)) == false) { |
aveenismail
force-pushed
the
auth_salt
branch
2 times, most recently
from
December 2, 2026 12:48
a88f72e to
797a238
Compare
… in a password protected PEM file
aveenismail
force-pushed
the
auth_salt
branch
from
December 2, 2026 13:17
81daa78 to
1c83d00
Compare
aveenismail
force-pushed
the
auth_salt
branch
8 times, most recently
from
December 3, 2026 08:27
c410000 to
4dc78f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.