* fix keystore type; update unit tests
* add changelog fragment
* document new param 'keystore_type'
* add keystore_type support (backward compatible)
* check JKS format with magic bytes
* update integration tests
* revert first changes in unit tests
* update changelog fragment
* fix magic bytes for python2/python3
* fix integration tests (irrelevant check_mode)
* fix unit test (keystore removed before failure => changed=true)
* fix typo
* fix spelling
* shorten a branch
* mock is_jks_or_pkcs12
* fix function path in unit tests
* Apply suggestions from code review (spelling)
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* rename a method (module + unit tests)
* move ArgumentSpec class content to main()
* refactor create() to not loose existing keystore in case of error
* update unit tests
* add integration test (error handling)
* fix keystore backup cleanup
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Adding cryptography as a backend for OpenSSL operations
* Updating unit tests and adding changelog fragment
* Allowing private key password option when using unprotected key
* Incorporating suggestions from initial review
* Centralizing module exit path
* java_keystore - improve error handling and returned results
* set check_rc=False to return results as documented when module fails
* set LANG, LC_ALL and LC_MESSAGES to C to rely keytool output parsing
* fix pylint's `no-else-return` and `unused-variable` hints
* update related unit tests accordingly
* add a changelog fragment
update unit test (remove stdout_lines from returned dict)
fix unit test: failure is now expected when alias does not exist
* Update changelogs/fragments/2183-java_keystore_improve_error_handling.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix integration test: overwrite keystore at the same location
Co-authored-by: Felix Fontein <felix@fontein.de>
* replace inline clear password by environment variable on a per-command basis.
* add changelog fragment
* update related unit tests
* Update changelogs/fragments/2177-java_keystore_1668_dont_expose_secrets_on_cmdline.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* fix unit test: force result without lambda
Co-authored-by: Felix Fontein <felix@fontein.de>
* improve temporary files storage (naming/removal)
* update unit tests
* Update changelogs/fragments/2163-java_keystore_1667_improve_temp_files_storage.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* add dedicated function to randomize PKCS#12 filename
fix unit tests (also mock the new function)
Co-authored-by: Felix Fontein <felix@fontein.de>
* This fixes (#275)
* Migrated PR from https://github.com/ansible/ansible/pull/47768
* Applied requested changes
* Fixed issue with load_file_common_arguments
* Using args list when calling run_commands
* Keytool now reads passwords from stdin
* Fixed PEP8 indentation issues