Commit Graph

404 Commits (29ed12e7fd604fde8a8ed5973dacf3d99546b28f)

Author SHA1 Message Date
Felix Fontein eb97f8ee75 Release 1.5.0. 2021-03-08 06:54:42 +01:00
Felix Fontein ea4aac6af1 Add 1.5.0 release summary. 2021-03-08 02:16:11 +01:00
Felix Fontein a1897fd3b1
luks_device: add sector_size option (#193)
* Add sector_size option to luks_device.

* Trying to improve error handling.

* Improve error handling.
2021-03-02 22:02:31 +01:00
Felix Fontein ea889ce2ad
Linting. (#191) 2021-02-11 07:53:50 +01:00
Felix Fontein c20553ce68
Update targets for CI for devel branch; move some targets to stable-2.10. (#190) 2021-02-10 22:52:40 +01:00
Felix Fontein 9732107ba6
Bump AZP test container version. (#189) 2021-02-10 13:47:04 +01:00
Felix Fontein b22c4fb65a
Fix CI (#188)
* Limit cryptography to < 3.4 for Python < 3.6.

* Make sure cryptography 3.3+ is installed on Darwin.

* Work around old pip versions.
2021-02-09 06:47:30 +01:00
Felix Fontein 4b638a9608
Improve documentation, in particular of ACME modules (#181)
* Use B(...) instead of RST formatting (which does not work for options).

* Improve the documentation on acme_directory.

It now mentions the ACME v1 deprecation for Let's Encrypt,
and mentions that ZeroSSL works.

* Improve ACME module documentation.

* Update plugins/doc_fragments/acme.py
2021-02-02 19:29:49 +01:00
Ed Schaller b0dbccaf3c
openssl_csr: handle missing basic constraint (#180)
* openssl_csr: handle missing basic constraint

* openssl_csr: condense missing basic constraint check

As suggested by felixfontein

* add changelog fragment

* Update changelogs/fragments/179-openssl-csr-basic-constraint.yml

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-02-01 21:40:51 +01:00
Felix Fontein 36683e1dd7
Fedora 30 and 31 are EOL and will eventually be removed from devel. (#182) 2021-02-01 15:30:52 +00:00
Felix Fontein 15a0be6107
Deprecate returning orders when retrieve_orders=url_list. (#178)
This allows to get rid of the ignore.txt entries for the return value syntax
error since then orders will always have the same type when returned.
2021-01-27 09:03:34 +01:00
Felix Fontein a728cb61d2 Next replanned release is 1.5.0. 2021-01-26 13:13:36 +01:00
Felix Fontein 606e1cd4da Release 1.4.0. 2021-01-26 12:38:36 +01:00
Felix Fontein c7ef362d7a
openssl_pkcs12: allow to specify certificate bundles in other_certificates (#166)
* 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>
2021-01-26 10:21:49 +01:00
Felix Fontein d8ccebce60
openssl_csr: allow to specify CRL distribution endpoints (#167)
* Improve error messages for name decoding (not all names appear in SANs).

* Refactor DN parsing, add relative DN parsing code.

* Allow to specify CRL distribution points.

* Add changelog fragment.

* Fix typo.

* Make sure value argument to x509.NameAttribute is a text.

* Update changelogs/fragments/167-openssl_csr-crl-distribution-points.yml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Add example.

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-26 09:57:40 +01:00
Felix Fontein a7c06b2ec4 Add release summary for 1.4.0. 2021-01-26 09:57:25 +01:00
Felix Fontein 4f7ab6733d
Add Ubuntu 20.04 to CI (#176)
* Add Ubuntu 20.04 to CI.

* Also use longer keys for Ubuntu 20.04.

* Fix condition.
2021-01-22 21:39:53 +01:00
Felix Fontein 7714893294
Bump CI to FreeBSD 11.4, 12.2, add FreeBSD 12.1 to remote 2.10 tests (#174)
* Bump CI to FreeBSD 11.4, 12.2, add FreeBSD 12.1 to remote 2.10 tests.

* Use correct package prefix.

* Make more future-proof.
2021-01-22 15:52:43 +01:00
Felix Fontein d921ff1f68
Allow to configure PBKDF (#163)
* Allow to configure PBKDF.

* Also add PBKDF options to key add operation.

* Simplify code.

* Update plugins/modules/luks_device.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

* Fix indent.

* Use more of the options.

* Bump iteration count.

* Increase memory limit.

* Fall back to default PBKDF.

* Apply suggestions from code review

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2021-01-22 12:21:03 +00:00
Orosz Dávid 3ca4c48b00
acme_certificate: Improve challenge docs (#175)
* Fix "'list object' has no attribute 'value'" error
2021-01-22 08:01:07 +01:00
Felix Fontein cd64bf8324
Add macOS 11.1 tests. (#170) 2021-01-18 10:52:04 +00:00
NorthFuture 2031787506
Added sever name option to use for SNI (#172)
* Added sever name option to use for SNI

* cleanup code

Co-authored-by: Felix Fontein <felix@fontein.de>

* added module version for new parameter

Co-authored-by: Felix Fontein <felix@fontein.de>

* added SNI explanation

Co-authored-by: Felix Fontein <felix@fontein.de>

* added SNI link to module description

* linting

* cleanup code

* Update plugins/modules/get_certificate.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* integration test for SNI server_name option

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-01-17 12:21:12 +01:00
Felix Fontein d43998facf
acme_certificate: error when requested challenge type is not found for non-valid challenges instead of hanging (#173)
* Error when requested challenge type is not found for non-valid challenges, instead of hanging on step 2.

* Only run check on first step.
2021-01-17 12:17:52 +01:00
Felix Fontein acab276d51
Relicense plugins/module_utils/acme.py under GPLv3+. (#165)
The code was originally licensed under GPLv3+ when being part of the
letsencrypt module. It was relicensed under BSD 2-clause when moving
to Ansible's module_utils (https://github.com/ansible/ansible/pull/40697).
The code was only touched by two persons
(https://github.com/ansible/ansible/commits/pre-ansible-base/lib/ansible/module_utils/acme.py,
https://github.com/ansible-collections/community.crypto/commits/main/plugins/module_utils/acme.py)
and both persons consented in this PR
(https://github.com/ansible-collections/community.crypto/pull/165)
before it was merged.
2021-01-14 14:54:51 +00:00
Felix Fontein 95040da881 Remove shippable config. 2021-01-12 21:42:27 +01:00
Felix Fontein ccb25eab36
luks_device - make add/removal of keyfile/passphrase idempotent (#168)
* Update documentation, adjust tests, add changelog fragment.

* Move module unit test to correct place.

* Implement keyfile / passphrase test.
2021-01-03 11:22:41 +01:00
AutumnalAntlers fb2f3ef2b5
Correct minor typo in OpenSSH module documentation (#164)
Co-authored-by: Antlers <Antlers@luris.net>
2020-12-31 09:43:04 +01:00
Andrew Klychkov b2e13d3c03
Documentation: fix modules formatting (#161)
* Documentation: fix modules formatting

* Apply suggestions from code review

* Fix sanity

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-19 17:15:10 +01:00
Felix Fontein b10e86a4ba Remove Shippable badge. 2020-12-18 17:24:21 +01:00
John R Barker 04611d833d
AZP Coverage support for Ansible 2.9 (#162)
Pull in latest changes from shippable-migration-tool
ci_complete ci_coverage
2020-12-16 11:42:33 +00:00
Andrew Klychkov 2c25719da5
Documentation: fix formatting (#157)
* Documentation: fix formatting

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-12-12 18:19:49 +01:00
John R Barker 3c7514f653
AZP: Install ansible:devel during report-coverage (#159)
ci_complete ci_coverage
2020-12-11 15:29:56 +00:00
John R Barker 42e8279c75
Remove PATH hack (#158) 2020-12-11 13:43:34 +00:00
John R Barker 5ba60e6f66
README- AZP Badge 2020-12-10 16:28:05 +00:00
John R Barker 3fa229b7b3
Fix Azure Pipelines (#155)
* Fix Azure Pipelines

* Simplify AZP stages
* Remove hacks, use azure-pipelines-test-container:1.7.0
* Expand test matrix

* chown
2020-12-10 15:40:28 +00:00
John R Barker 52f7f0212b
Basic AZP configuration (#154) 2020-12-08 20:15:34 +00:00
Felix Fontein 4d8dcad190
Speed up tests (#153)
* Improve openssh_* tests.

* Use 2048 instead of 4096 bit keys in many places.

ci_complete

* Parameterize default RSA key length for tests.

* Reduce default RSA key size to 1024.

ci_complete

* Fix error.

ci_complete

* Use variable more often.

* Use 2048 bits for RSA keys for certificates on RHEL8 and CentOS8.

ci_complete

* Fix missing constant.

ci_complete

* Print default key sizes.
2020-12-04 13:08:14 +00:00
Felix Fontein d7ad3e32d4 Bump version. 2020-11-24 19:41:26 +01:00
Felix Fontein c9524e9c09 Release 1.3.0. 2020-11-24 19:40:52 +01:00
Felix Fontein c2122acfba Add release summary. 2020-11-24 19:40:05 +01:00
Felix Fontein 69335a8bac
Refactor x509_certificate module, add x509_certificate_pipe module (#135)
* Move documentation to doc fragment.

* Prepare module backends.

* Linting.

* Fix comments.

* First shot at actually moving code.

* Forgot SKI check.

* Remove unused imports.

* Improve check mode.

* Fix 'returned'.

* Move csr_* checks.

* Explicitly specify parameter.

* Add x509_certificate_pipe module.

* Update other seealsos.

* Forgot to remove doc fragment.

* Adjust to work with macOS 10.15.

* Update plugins/module_utils/crypto/module_backends/certificate_entrust.py

Co-authored-by: Chris Trufan <31186388+ctrufan@users.noreply.github.com>

* Add changelog fragments for entrust bugfix and module refactorings.

* Restore old behavior of Entrust backend when existing certificate cannot be parsed.

* Update plugins/modules/x509_certificate_pipe.py

Co-authored-by: Chris Trufan <31186388+ctrufan@users.noreply.github.com>

* Remove Entrust provider from x509_certificate_pipe for now.

* Add own CA tests.

* One more fix for Entrust provider, when csr_content is used.

* Update plugins/modules/x509_certificate_pipe.py

Co-authored-by: Chris Trufan <31186388+ctrufan@users.noreply.github.com>

* Fix another broken example.

* Revert "Remove Entrust provider from x509_certificate_pipe for now."

This reverts commit 6ee5d7d4f99f0fe2218276a2d3f1f38b676c29b9.

* ci_complete

* Apply suggestions from code review

Co-authored-by: MarkusTeufelberger <mteufelberger@mgit.at>

* Improve example.

* Improve readability of example, add another one.

* Extend descriptions of csr_* for selfsigned.

* Improve documentation.

* Move deprecation message up.

* Explain empty choices.

Co-authored-by: Chris Trufan <31186388+ctrufan@users.noreply.github.com>
Co-authored-by: MarkusTeufelberger <mteufelberger@mgit.at>
2020-11-24 17:21:52 +01:00
Norman Ziegner 86b39733e1
openssl_pkcs12: Add a check for parsed pkcs12 files (#145)
* 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>
2020-11-23 09:14:45 +01:00
Felix Fontein 94b23d62db
Fix boolean default. (#146) 2020-11-22 13:14:15 +01:00
Felix Fontein 942255923b
Add x509_certificate tests for ACME provider (#142)
* Add x509_certificate tests for ACME provider.

* Make it work with Python 2.x.

* Cleanup.

* Add more tests.
2020-11-13 08:22:32 +01:00
Felix Fontein 68b45c2812
Fix example in docs, and make sure to wipe result variable (#140)
* Fix example in docs, and make sure to wipe result variable.

* Update plugins/modules/openssl_privatekey_pipe.py

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-11-10 10:47:16 +01:00
Felix Fontein 77d652da9a
Improve error handling in support code for cryptography backend (#139)
* Improve error handling in support code for cryptography backend.

* Update changelogs/fragments/139-improve-error-handling.yml

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>

Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
2020-11-10 10:47:10 +01:00
Felix Fontein c7268c7fc4
Fix bug in AnsibleActionModule. (#141) 2020-11-08 17:28:44 +01:00
Felix Fontein 5ffe97f874
Work around problem with cryptography being upgraded while installing pyOpenSSL (#137)
* Work around problem with cryptography being upgraded while installing pyOpenSSL.

* Avoid another instability.
2020-11-03 12:39:58 +01:00
Felix Fontein ec7e4916e5
Move action_module from module_utils to plugin_utils (#134)
* Move action_module from module_utils to plugin_utils.

* ci_complete
2020-11-03 09:21:35 +01:00
Felix Fontein ec55161cb1
Run tests with macOS 10.15. (#112)
* Run tests with macOS 10.15.

* Update prepare_http_tests as in https://github.com/ansible/ansible/pull/71841/files.

* Also skip luks_device tests on macOS.

* Temporarily restrict to macOS/OSX nodes.

* Show full OpenSSL version.

* Show pyOpenSSL debug details.

* Make location of openssl binary configurable.

* Try to upgrade openssl on macOS when LibreSSL is found.

* Use other variable.

* Use found binary instead of default.

* Revert "Temporarily restrict to macOS/OSX nodes."

This reverts commit ea379382e5.

ci_complete

* Avoid crashing when OpenSSL.debug does not exist.

* Combine setup_openssl_cli with setup_openssl

* Split up setup_openssl in setup_openssl (openssl + cryptography) and setup_pyopenssl.

* Fix package name.

* Don't install cryptography on CentOS 6, print environment.

* Work around ansible-test limitation.
2020-11-03 08:45:32 +01:00