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

Provide way to export public key for a given slot akin to ykman piv keys export #501

Open
ecerulm opened this issue Aug 7, 2024 · 0 comments

Comments

@ecerulm
Copy link

ecerulm commented Aug 7, 2024

The YubiKey Manager provides

ykman piv keys export 9a public.pem

to obtain the public key corresponding to the certificate/private key in slot 9a.

It would be great to have a corresponding action in yubico-piv-tool to do the same.

Right now, AFAIK, the only way to get the public key using yubico-piv-tool is during the generation with

yubico-piv-tool -a generate -s 9a --touch-policy=never --pin-policy=once -A RSA2048 -o public.pem

or to use read-certicate action together with openssl to extract the public key from the certificate like this

yubico-piv-tool -a read-certificate -s 9a | openssl x509 -noout -pubkey
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuXiyBsdCdho3e0eAWNYo
....
....
....
0wIDAQAB
-----END PUBLIC KEY-----

But it would be helpful / convenient to have an equivalent to ykman piv keys export in yubico-piv-tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant