-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow to generate pkcs12 containing cert and private key #17
Conversation
Add new ssl_certificate attribute to allow PKCS12 file generation: * `pkcs12_path` set the path to the generated PKCS12 file * `pkcs12_passphrase` set an optional passphrase on the PKCS12 file
end | ||
|
||
def default_pkcs12_passphrase | ||
lazy { read_namespace(%w(pkcs12_passphrase)) } |
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.
We also need to update the README namespace documentation with these:
| `namespace['pkcs12_path']` | Optional PKCS12 full path.
| `namespace['pkcs12_passphrase']` | Optional PKCS12 passphrase.
Thanks again @Annih. Your PRs are really complete 😉 Aside from what I've told you about the documentation, everything is perfect. |
179c867
to
bb0e41d
Compare
@@ -407,6 +409,8 @@ When a namespace is set in the resource, it will try to read the following attri | |||
| `namespace['ssl_chain']['content']` | Intermediate certificate chain content used when reading from attributes. | |||
| `namespace['ca_cert_path']` | Certificate Authority full path. | |||
| `namespace['ca_key_path']` | Key Authority full path. | |||
| `namespace[pkcs12_path']` | Optional PKCS12 full path. | |||
| `namespace[pkcs12_passphrase']` | Optional PKCS12 passphrase. |
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.
Opening single quotes are missing here.
bb0e41d
to
34718d2
Compare
Sorry, I was not very focus on my last fix =] |
Awesome! Thank you @Annih. |
Allow to generate pkcs12 containing cert and private key
It seems that this implementation does not work properly, I tried to fix it in a634a0c. Let me know if I broke something. |
Hello @zuazo, What was the issue you tried to fix? I didn't get it with your patch, maybe something wrong with the passphrase? I won't be able to test, or update the other PR before 16th of september, sorry for the bug :( |
For example, running your kitchen tests gave me the following error:
As you can see, the PKCS12 was not generated. Don't worry about it. You have done a great job. Someday I have to refactor the libraries or document them properly because currently it is very difficult to contribute to this cookbook code. |
Released in |
Hello,
This is a small PR to allow generation of a p12 file containing both certificate and private key.
Again I tried to add useful tests and a bit of documentation, but let me know if you want me to add more.
@zuazo this one should already follow rubocop normally :)
cc. @aboten