-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HSMSigner: Implement token identification
I bought a second yubikey so need a way to tell them apart... so: Define a URI that contains identifying information for the HSM token: * URI path is the keyid * URI query contains token field filters Example URI: "hsm:2?label=YubiKey+PIV+%2315835999" This would use keyid 2 from a token with label "YubiKey+PIV+%2315835999". The example is also what gets automatically created on HSMSigner.import_(). Other fields can also be used -- I believe there is no standard for these so this seemed sensible. Running import_() now fails if there are more than 1 tokens (but a filter can be provided there as well). Because of this the tests needed some changes (softhsm creates a new token in InitToken???) -- unfortunately this means the default import_() filter is not tested as I couldn't figure out how to remove the extra softhsm token. import_() stays backwards compatible, and old URIs keep working. The constructor has a new required argument (this could be fixed but I didn't see it as that important).
- Loading branch information
Showing
2 changed files
with
90 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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