Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

piv: implement key metadata retrieval #130

Merged
merged 1 commit into from Aug 31, 2023
Merged

Conversation

Merovius
Copy link
Contributor

Add support for a YubiKey vendor extension to retrieve public metadata (including the public key, PIN/Touch policies and whether or not the key was hardware generated) for a given key slot.

Also use this new method to determine the pin policy, for YubiKeys that support it. This is more general than using the attestation certificate, as it also works for keys that have been generated offline and imported into the hardware token.

Fixes #129

Add support for a YubiKey vendor extension to retrieve public metadata
(including the public key, PIN/Touch policies and whether or not the key
was hardware generated) for a given key slot.

Also use this new method to determine the pin policy, for YubiKeys that
support it. This is more general than using the attestation certificate,
as it also works for keys that have been generated offline and imported
into the hardware token.

Fixes go-piv#129
@Merovius
Copy link
Contributor Author

TestYubiKeyPINRetries fails with the YubiKey I use for testing, but it fails on master as well. I will try to investigate why that is and might send a separate PR.

@ericchiang
Copy link
Collaborator

I think many of the tests are flakey since we don't have a good way to test them automatically, and I always end up testing with a different yubikey version. I wouldn't worry about it too much.

Thanks a bunch for the PR! I'll cut a release when I get a chance

@ericchiang ericchiang merged commit 8c3a0ff into go-piv:master Aug 31, 2023
4 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.

Support GET METADATA command and use it to derive default PIN policy
2 participants