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

Generate public key in generate_keypair() #147

Open
chester-leung opened this issue Jun 14, 2021 · 3 comments · Fixed by #186
Open

Generate public key in generate_keypair() #147

chester-leung opened this issue Jun 14, 2021 · 3 comments · Fixed by #186
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@chester-leung
Copy link
Member

Currently, generate_keypair() outputs a private key and a certificate. We should modify this function to also generate and output a public key.

@lvntky
Copy link
Contributor

lvntky commented Jun 16, 2021

hi @chester-leung i'm on to this. should i create a new variable public_key = _LIB.get_public_key() and change the private key with this variable?

@chester-leung
Copy link
Member Author

hi @lvntky, for this you'll have to look at this function. As you can see we generate a private key and a certificate using the Python OpenSSL crypto library.

To get the public key as well you'll have to make another OpenSSL crypto call -- likely this one to dump the public key. We already dump the private key here -- you'll likely just have to do something similar to dump the public key.

Would be great if you can also test what you implement to ensure that the public and private key work together as a pair. Thank you!

@lvntky
Copy link
Contributor

lvntky commented Jun 16, 2021

okay @chester-leung thank you for this great information. I'm on to it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants