-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add command to generate keypair on a PKCS#11 token #551
Add command to generate keypair on a PKCS#11 token #551
Conversation
0fe9025
to
dce5ace
Compare
dce5ace
to
adf6c50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess one tricky thing is that, if we want to support EC keys, we need to encode ECParamters in ASN.1 and the tool would probably need to link to libtasn1, which is currently an optional build dependency for the trust module. I guess some tweak in the build infrastructure is needed, e.g., check libtasn1 is available, and if yes, link p11-kit tool to it; otherwise we shouldn't but we can still support RSA.
adf6c50
to
c31e6fa
Compare
c31e6fa
to
8e63d40
Compare
4bb00eb
to
6ae757c
Compare
cb54855
to
a5ef9d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No test, while CKM_MOCK_GENERATE
is supported?
e0700dc
to
7cb7f2f
Compare
40cfc9d
to
e2c22b1
Compare
27e0129
to
04fc3e5
Compare
04fc3e5
to
38696f7
Compare
38696f7
to
d041b02
Compare
Signed-off-by: Zoltan Fridrich <[email protected]>
d041b02
to
938d349
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, please remove "[WIP]" from the title when merging.
fd03086
to
3238000
Compare
3238000
to
938d349
Compare
Signed-off-by: Zoltan Fridrich <[email protected]>
Signed-off-by: Zoltan Fridrich <[email protected]>
938d349
to
3fbf587
Compare
When the user builds a solution around PKCS#11, such as setting up an HTTPS server with NGINX or Apache HTTPD, they first would need to create a key pair on a PKCS#11 token, where the private key can be used to sign the certificate and TLS handshake.
The generate-keypair subcommand has been added to generate a private key and the corresponding public key. This takes a PKCS#11 URI of a token, where the generated keys are stored, and a label through the --label option. It can also take other options, such as --type to specify the key type and --bits to specify the key size.