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

Use private_key parameter when creating certificate #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vasilevalex
Copy link

Pull Request (PR) description

Use private key created before, not the default value.

This Pull Request (PR) fixes the following issues

Fixes #185

Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we need more test coverage too, since this was broken and no tests failed.

@zilchms
Copy link
Contributor

zilchms commented May 3, 2024

I am still not sure if we want to allow direct private key passing into the certificate. CSRs exist for exactly this reason. The regression for no longer allowing directly passing keys into certs and using CSRs instead was made specifically for this reason.

To be clear: I am not against allowing passing the private key directly, I just would like to get a good reason to do so

I may also be completely wrong here, been a while since I made those changes

@vasilevalex
Copy link
Author

In the simplest case without CA we need some private key to sign the certificate. So openssl is invokeg with -signkey:

options << ['-signkey', resource[:private_key]]

with the private key as parameter. And if we don't pass the private key generated earlier, default value would be used.

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.

[Bug] TLS certificate can't be created if the directory for private key is specified
3 participants