java_cert: import certificate+key bundle from pkcs12 (#3080)

* import certificate+key bundle from pkcs12

* fix typo/syntax

* fix variable name

* fix passwords order and improve error handling

* add changelog fragment

* enter keystore pass only once if keystore already exists, and twice at creation

* nomalize tests

- Replace `command` tasks by dedicated (community.crypto) modules.
- Add spaces around jinja2 variable names.
- Call modules by their FQCNs.

* Add tests to check keystore has a private key

fix tests for RedHat/CentOS < 8 (run openssl command as an alternative to
`openssl_pkcs12` module)
This commit is contained in:
quidame 2021-07-26 11:42:13 +02:00 committed by GitHub
commit 21d5668c97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 203 additions and 75 deletions

View file

@ -0,0 +1,4 @@
---
bugfixes:
- java_cert - import private key as well as public certificate from PKCS#12
(https://github.com/ansible-collections/community.general/issues/2460).