You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyOpenSSL fails to dump the private key (which is None when parsed from p12)
File "/tmp/ansible_openssl_pkcs12_payload_tfn6ujgx/ansible_openssl_pkcs12_payload.zip/ansible/modules/crypto/openssl_pkcs12.py", line 449, in <module>
File "/tmp/ansible_openssl_pkcs12_payload_tfn6ujgx/ansible_openssl_pkcs12_payload.zip/ansible/modules/crypto/openssl_pkcs12.py", line 412, in main
File "/tmp/ansible_openssl_pkcs12_payload_tfn6ujgx/ansible_openssl_pkcs12_payload.zip/ansible/modules/crypto/openssl_pkcs12.py", line 246, in check
File "/tmp/ansible_openssl_pkcs12_payload_tfn6ujgx/ansible_openssl_pkcs12_payload.zip/ansible/modules/crypto/openssl_pkcs12.py", line 341, in parse
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1899, in dump_privatekey
raise TypeError("pkey must be a PKey")
TypeError: pkey must be a PKey
The text was updated successfully, but these errors were encountered:
Original issue from Ansible github: https://github.com/ansible/ansible/issues/59945
SUMMARY
When generating a PKCS12 keystore without a private key, if the file exists, parsing it fails
ISSUE TYPE
COMPONENT NAME
openssl_pkcs12 (likely caused by https://github.com/ansible-collections/community.crypto/blob/main/plugins/modules/openssl_pkcs12.py#L363)
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 18.04 inside WSL1 on Windows 10, but issue has been reproduced across various platforms (mainly CentOS 7.7)
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
PyOpenSSL fails to dump the private key (which is None when parsed from p12)
The text was updated successfully, but these errors were encountered: