-
Notifications
You must be signed in to change notification settings - Fork 90
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
x509_certificate_convert does not fail on bad sources #809
Comments
Right now the module does not care about the certificate's contents. An empty or broken file is treated as a DER certificate and converted to PEM by Base64 encoding it and adding line-breaks and header/footer. This allows the module to also handle certificates that cryptography cannot load, for example. Maybe we should add a |
So why would you want to use things cryptography doesn't support? If |
Backwards compatibility, mainly. |
I created a PR that adds such an option in #830. |
SUMMARY
When using the module
x509_certificate_convert
, if the certificate source is bad, it will (incorrectly) report changed and the output will be empty/invalid.ISSUE TYPE
COMPONENT NAME
x509_certificate_convert
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 24.04
STEPS TO REPRODUCE
Run example playbook:
EXPECTED RESULTS
Playbook should fail on task "Convert certificate" because the input (
src_path
) is not a valid certificate.ACTUAL RESULTS
Playbook completes successfully, with the task "Convert certificate" showing as changed.
The text was updated successfully, but these errors were encountered: