264 Commits

Author SHA1 Message Date
Felix Fontein
22e24f24c6 Release 2.16.1. 2023-12-04 21:49:56 +01:00
Felix Fontein
9cc1731767 Revert "Release 2.17.0."
This reverts commit c592eaa35a.
2023-12-04 21:49:29 +01:00
Felix Fontein
c592eaa35a Release 2.17.0. 2023-12-04 21:49:01 +01:00
Felix Fontein
525a8a5df4 Prepare 2.16.1. 2023-12-04 21:35:41 +01:00
Felix Fontein
e4ba0861e5 Retry also on certain connection errors. (#680) 2023-12-04 21:34:51 +01:00
Felix Fontein
6bd5eee9b0 Release 2.16.0. 2023-10-29 15:59:31 +01:00
Felix Fontein
fc707c7e31 Add changelog fragment for #664. 2023-10-29 10:55:12 +01:00
Felix Fontein
eba7e32df1 Due to a new feature, the next release will be 2.16.0. 2023-10-29 10:53:53 +01:00
Felix Fontein
428550165a Fix typos and FQCN (#669)
* Fix typos.

* Use FQCNs in examples.
2023-10-28 22:54:56 +02:00
Felix Fontein
a150e77507 Prepare 2.15.2 release. 2023-10-28 22:14:10 +02:00
Felix Fontein
d1299c11d6 Handle pyOpenSSL 23.3.0, which removed PKCS#12 support (at least partially). (#666) 2023-10-28 13:38:07 +00:00
Felix Fontein
d7293aa1cd Release 2.15.1. 2023-08-22 06:54:54 +02:00
Felix Fontein
1e78918ad3 Prepare 2.15.1 release. 2023-08-21 20:51:04 +02:00
Felix Fontein
526b3c4393 Allow type to be missing. (#652) 2023-08-21 20:49:55 +02:00
Felix Fontein
e41a50af97 Release 2.15.0. 2023-08-12 18:10:13 +02:00
Felix Fontein
d3737f5ef7 Update release summary. 2023-08-12 17:15:09 +02:00
Felix Fontein
addbd067c8 openssh_* modules: check return code on ssh(-keygen) invocations; fail if comment cannot be updated (#646)
* Check return code on ssh(-keygen) invocations.

* openssh_cert: only check for errors if certificate should be present and module is not in check mode.

* Handle rc check for _get_private_key().

* Add changelog fragment.

* Only pass -o for comment updating when necessary.

* Now fails if comment cannot be updated.

This was silently ignored in the past.

* Avoid failing operation.
2023-08-12 17:14:00 +02:00
Felix Fontein
62c842548d Deprecate the default value 'false' of asn1_base64. (#600) 2023-08-12 12:23:37 +02:00
Felix Fontein
e64d617de6 Prepare 2.15.0 release. 2023-08-02 11:23:22 +02:00
Felix Fontein
6c72734652 Release 2.14.1. 2023-06-27 18:03:55 +02:00
Felix Fontein
83af72a3bc Improve PEM identification. (#628) 2023-06-27 17:35:55 +02:00
Felix Fontein
8fa4dc75c9 Prepare 2.14.1. 2023-06-24 10:02:16 +02:00
Felix Fontein
99d1521266 Use semantic markup (#626)
* Enable semantic markup.

* Use semantic markup.

* Break long lines.

* Add ignores.

* Use real option, not alias.
2023-06-24 10:00:56 +02:00
Felix Fontein
1f84d0a317 Release 2.14.0. 2023-06-15 12:52:42 +02:00
Felix Fontein
2f64d42855 Adjust release summary. 2023-06-15 12:52:15 +02:00
Marcin Słowikowski
9c07a8354e Added support for certificates in DER format for x509_certificate_info module (#622)
* Added support for DER format

* Updated description

* Adjusted description

The content of the certificate cannot be in DER format due to an input encoding problem in the Ansible module, but it works fine when reading the certificate from a file

* Update support.py

* Added der_support_enabled flag for DER-format support

* Added changelog fragment for #603

* Fixed typo

* Fixed missing import

* Resolved issues found by static code analysis

* Update plugins/module_utils/crypto/support.py

Committed suggested change

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

* Apply suggestions from code review

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-06-15 12:51:14 +02:00
Felix Fontein
ad118bbbd6 Prepare 2.14.0 release. 2023-06-09 06:10:06 +02:00
Felix Fontein
d823382732 Validate challenges in parallel instead of serially. (#617) 2023-06-09 06:04:34 +02:00
Felix Fontein
17702d1a76 acme_certificate: allow 'no challenge' (#615)
* Allow 'no challenge'.

* Fix undefined variable.
2023-06-05 20:54:07 +02:00
Felix Fontein
05ad2e5008 Release 2.13.1. 2023-05-21 14:12:40 +02:00
Felix Fontein
c703dd6056 Rewrite EE test workflows to use ansible-builder 3.0.0; fix EE dependencies (#606)
* Adjust EE tests to ansible-builder 3.0.0.

* Remove other CI workflows.

* Use docker instead of podman...

* Support Rocky Linux 9+.

* Add CentOS Stream 9 to EE tests.

* Fix installation of PyOpenSSL on CentOS/RHEL/Rocky.

* ansible-builder only attempts to install EPEL deps on CentOS.

* Make EPEL also available on Rocky Linux 9, even though ansible-builder will ignore it.

* Make sure cryptography is already installed.

* Try ansible-runner < 2.0.0 for CentOS Stream 8 / RHEL 8.

* Show more info.

* Start restricting transitive dependencies...

* Looks like PyOpenSSL is **broken** on CentOS Stream 9 + EPEL.

* ansible-builder will NOT work with Python 3.6.

use Python 3.9 on RHEL8 / CentOS Stream 8. Manually install cryptography and PyOpenSSL for Python 3.9 as well.

* PyOpenSSL isn't available for Python 3.8 or 3.9.

* Revert "Remove other CI workflows."

This reverts commit 3a9d125f45.

* Use podman instead of docker.

* Re-order bindep entries.

* python3-pyOpenSSL does not exist on RHEL/CentOS 6 and 7.
2023-05-21 12:43:14 +02:00
Felix Fontein
153de3ffef Prepare 2.13.1. 2023-05-21 08:39:06 +02:00
Felix Fontein
39bba05a17 Release 2.13.0. 2023-05-01 21:27:25 +02:00
Felix Fontein
a8f27f93b7 Prepare 2.13.0. 2023-05-01 21:18:46 +02:00
David Zaslavsky
ce3299f106 Always generate a new key pair if the private key doesn't exist (#598)
* Always generate a new key pair if the private key doesn't exist (#597)

This commit updates `KeypairBackend._should_generate()` to first check
if the original private key named by the `path` argument exists, and
return True if it does not. This brings the code in line with
the documentation, which says that a new key will always be generated if
the key file doesn't already exist.

As an alternative to the approach implemented here, I also considered
only modifying the condition in the `fail` branch of the if statement,
but I thought that would not map as cleanly to the behavior specified in
the documentation, so doing it the way I did should make it easier to
check that the code is doing the right thing just by looking at it.
I also considered doing something to make the logic more similar to
`PrivateKeyBackend.needs_regeneration()` (the openssl version of this
functionality), because the two are supposed to be acting the same way,
but I thought that'd be going beyond the scope of just fixing this bug.
If it'd be useful to make both methods work the same way, someone can
refactor the code in a future commit.

* Test different regenerate values with nonexistent keys

This commit changes the test task that generates new keys to use each of
the different values for the `regenerate` argument, which will ensure
that the module is capable of generating a key when no previous key
exists regardless of the value of `regenerate`. Previously, the task
would always run with the `partial_idempotence` value, and that obscured
a bug (#597) that would occur when it was set to `fail`. The bug was
fixed in the previous commit.
2023-05-01 21:16:42 +02:00
Felix Fontein
c568923478 x509_crl: prepare releasing the mode option for AnsibleModule's use (#596)
* Prepare releasing the mode option for AnsibleModule's use.

* Update docs.
2023-04-29 20:54:24 +02:00
Felix Fontein
e6a0d2884a Release 2.12.0. 2023-04-16 19:48:15 +02:00
Felix Fontein
0be88ab458 Prepare 2.12.0 release. 2023-04-16 13:36:59 +02:00
Felix Fontein
30756b12ea Add asn1_base64 option. (#592) 2023-04-16 13:34:45 +02:00
Felix Fontein
50a26191ea Release 2.11.1. 2023-03-24 07:19:51 +01:00
Felix Fontein
a28b02b0ac Prepare 2.11.1 release. 2023-03-23 21:27:44 +01:00
Felix Fontein
d4509bce5f Release 2.11.0. 2023-02-23 09:28:13 +01:00
Austin Lane
ced0e30506 EL9 - Retrieve python3-pyOpenSSL from epel (#575)
* EL9 - pull python3-pyOpenSSL from epel

* Incorporate bindep changes from felixfontein

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

* Add changelog fragment for PR #575

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-22 23:16:26 +01:00
Felix Fontein
65d1881f12 Prepare 2.11.0 release. 2023-02-10 21:02:11 +01:00
dlehrman
b000491514 Support Custom Cipher Selection (#571)
* Enable custom cipher selection for get_certificate

* get_certificate ciphers desc grammar fix

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

* get_certificate ciphers desc grammar fix

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

* get_certificate ciphers include version_added

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

* Add changelog fragment

* Fail if ciphers is set and Python < 2.7.9

* Standardize ciphers conditionals in get_certificate

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

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
2023-02-10 21:01:13 +01:00
Felix Fontein
70c4585b88 Fix deprecation handling. (#572) 2023-02-09 15:36:23 +01:00
Felix Fontein
aea3713484 Remove unneccessary imports (#569)
* Remove unneccessary imports.

* Add noqas.

* Add comment which name is actually ignored.
2023-02-09 11:57:54 +01:00
Felix Fontein
b19c83578d Release 2.10.0. 2023-01-02 19:54:30 +01:00
Felix Fontein
ddfb18b609 openssl_csr: fix bad tests, avoid accepting invalid crl_distribution_points records (#560)
* Improve error handling.

* Remove invalid tests.

* Add changelog fragment.

* Fix tests.

* Improve exception catching.

Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>

* Prevent empty full_name.

* Fix condition. Make sure errors are caught.

* Add more checks.

Co-authored-by: Kristian Heljas <11139388+kristianheljas@users.noreply.github.com>
2023-01-02 14:52:59 +00:00
Felix Fontein
095434a4c1 Prepare 2.10.0 release. 2022-12-31 18:05:12 +01:00