* Make type checking more strict.
* mypy: warn about unreachable code.
* Enable warn_redundant_casts.
* Enable strict_bytes.
* Look at some warn_return_any warnings.
* Look at possibly-used-before-assignment.
* Use latest beta releases of ansible-core 2.19 for mypy and pylint.
* Look at unsupported-*.
* Look at unknown-option-value.
* Look at redefined-builtin.
* Look at superfluous-parens.
* Look at unspecified-encoding.
* Adjust to new cryptography version and to ansible-core 2.17's pylint.
* Look at super-with-arguments.
* Look at no-else-*.
* Look at try-except-raise.
* Look at inconsistent-return-statements.
* Look at redefined-outer-name.
* Look at redefined-argument-from-local.
* Look at attribute-defined-outside-init.
* Look at unused-variable.
* Look at protected-access.
* Look at raise-missing-from.
* Look at arguments-differ.
* Look at useless-suppression and use-symbolic-message-instead.
* Look at consider-using-dict-items.
* Look at consider-using-in.
* Look at consider-using-set-comprehension.
* Look at consider-using-with.
* Look at use-dict-literal.
* Enable basic type checking.
* Fix first errors.
* Add changelog fragment.
* Add types to module_utils and plugin_utils (without module backends).
* Add typing hints for acme_* modules.
* Add typing to X.509 certificate modules, and add more helpers.
* Add typing to remaining module backends.
* Add typing for action, filter, and lookup plugins.
* Bump ansible-core 2.19 beta requirement for typing.
* Add more typing definitions.
* Add typing to some unit tests.
* Get rid of backend parameter whenever possible.
* Always auto-detect if backend choices are 'cryptography' and 'auto', resp. always check cryptography version.
* Improve error message.
* Update documentation.
* openssl_pkcs12: Add support for `certificate_content` and `other_certificates_content`
Co-authored-by: Felix Fontein <felix@fontein.de>
* Added minimal tests.
The tests are minimal because internally it always ends up with the
_content variants, so even when supplying a file most of the internal
code paths then use the content.
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fix empty check for openssl_pkcs12 tests.
* Remove unnecessary imports.
* Prevent crash if PyOpenSSL cannot be imported because of an AttributeError.
* Add changelog fragment.
* Fix constraints file.
* Use Python 2.7 instead of 3.5 for 2.9 cloud tests (pip module is broken).
* Prevent upgrading cryptography on ansible-core 2.12's default container with Python 3.9.
* Prepare for distutils.version being removed in Python 2.12.
* Fix copy'n'paste error.
* Re-add Loose prefix.
* Fix Python version typo.
* Improve formulation.
* Move message into own line.
* Fix casing, now that the object is no longer called Version.
* Began refactoring.
* Continue.
* Factor PyOpenSSL backend out.
* Add basic cryptography backend.
* Update plugins/modules/openssl_pkcs12.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Only run tests when new enough pyOpenSSL or cryptography is around.
* Reduce required pyOpenSSL version from 17.1.0 to 0.15.
I have no idea why 17.1.0 was there (in the tests), and not something smaller.
The module itself did not mention any version.
* Linting.
* Linting.
* Increase compatibility by selecting pyopenssl backend when iter_size or maciter_size is used.
* Improve docs, add changelog fragment.
* Move hackish code to cryptography_support.
* Update plugins/modules/openssl_pkcs12.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Update plugins/modules/openssl_pkcs12.py
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Streamline cert creation.
* Convert range to list.
Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
* Rename identify.py to pem.py.
* Move split PEM list code to pem.py crypto module_utils.
* Extend and use global certificate splitting code in acme_certificate.
* openssl_pkcs12: allow to load multiple certificates from files mentioned in other_certificates.
* Add changelog and module_utils redirect.
* Remove old check.
* Fix typo.
* Apply suggestions from code review
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* Add example.
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
* openssl_pkcs12: Add a check for parsed pkcs12 files
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
* Add changelog fragment
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
* openssl_pkcs12: Report changed state when a pkcs12 file is dumped
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
* Add a basic test for dumping a pkcs12 file
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
* Update changelog fragment
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
* Add test for dumped pkcs12 file in check mode
Signed-off-by: Norman Ziegner <norman.ziegner@ufz.de>
* Do not crash when PKCS#12 file contains no private key and/or main certificate.
* Add changelog fragment.
* Call getters only once each, check explicitly for None.
* Add test.
* Also 'parse' correctly PKCS#12 file with no private key.