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

Rsa keygen #56

Merged
merged 4 commits into from
Sep 16, 2022
Merged

Rsa keygen #56

merged 4 commits into from
Sep 16, 2022

Conversation

simo5
Copy link
Member

@simo5 simo5 commented Sep 11, 2022

Try to implement RSA key generation function as best we can.

openssl genpkey assumes that you always have key data to return, which is obviously not the case when generateing a key on a token.

We provide a function to print the -text option, but errors are reported from the missing pem/der encoding functions although public and private keys are generated and stored in the DB.

A separate test binary checks that we can correctly generate keys and apply ID and Label to them.

@simo5 simo5 force-pushed the rsa_keygen branch 2 times, most recently from 0aebcd2 to b8bdb2a Compare September 11, 2022 02:38
@simo5
Copy link
Member Author

simo5 commented Sep 11, 2022

@fabled I gave another spin to the old rsa_keygen patch, this one is based on the session_obj PR

This also adds the ability to require a logged in slot at the same time
which is normally needed for operations that want to use a private key.

Signed-off-by: Simo Sorce <[email protected]>
@simo5 simo5 force-pushed the rsa_keygen branch 3 times, most recently from 428cdd2 to beae87b Compare September 15, 2022 21:08
Add RSA private key generation code
Generalize keymgmt dispatch helpers
Make some fuctions more generic
Add basic EC genkey support

Signed-off-by: Simo Sorce <[email protected]>
@simo5 simo5 force-pushed the rsa_keygen branch 2 times, most recently from d28ad60 to 59530c3 Compare September 16, 2022 14:55
Signed-off-by: Simo Sorce <[email protected]>
Only really prints key info when utils like openssl genpkey are given
options like -text

For pem or der format it currently returns error on selection and
specify null functions for encoders.

Signed-off-by: Simo Sorce <[email protected]>
@simo5
Copy link
Member Author

simo5 commented Sep 16, 2022

I think this is good enough for now, merging

@simo5 simo5 merged commit 23d3070 into latchset:main Sep 16, 2022
@simo5 simo5 mentioned this pull request Sep 16, 2022
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.

1 participant