Commit Graph

343 Commits (main)

Author SHA1 Message Date
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
Felix Fontein 5d24d04adf
Fix crash when public key cannot be parsed. (#551) 2022-12-28 18:28:50 +01:00
Felix Fontein e1e5dfccc1 Release 2.9.0. 2022-11-27 18:15:33 +01:00
Felix Fontein f853108d69 Prepare 2.9.0 release. 2022-11-17 12:43:40 +01:00
Katze 2a746115ca
fix #529 issuer_uri in x509_certificate_info (#530)
The issuer_uri is retrieved from the Authority Information Access field the same way as the OCSP responder URI is.
Handling is exactly the same since they reside in the same OID space and have the same data type.
Tests have also been added based on the integration test certificates.

Signed-off-by: benaryorg <binary@benary.org>

Signed-off-by: benaryorg <binary@benary.org>
2022-11-17 12:40:44 +01:00
Felix Fontein 42e27a360d Release 2.8.1 2022-11-06 22:02:07 +01:00
Felix Fontein 95b9df187f Prepare 2.8.1 release. 2022-11-06 21:13:02 +01:00
Felix Fontein 68b7c0d38c Release 2.8.0. 2022-11-02 12:56:08 +01:00
Felix Fontein 9ba0e25bfe
Handle new nonce call more gracefully when it does not return nonce. (#525) 2022-11-02 08:32:01 +00:00
Felix Fontein 9a64347ea6 Prepare 2.8.0 release. 2022-11-01 19:52:23 +01:00
Felix Fontein e4e2b804bc
Allow to configure encryption level. (#523) 2022-11-01 19:51:28 +01:00
Felix Fontein 4533b3e934
Include symbolic HTTP status codes in error and log messages when available. (#524) 2022-10-31 21:33:27 +01:00
Felix Fontein a5c43c26f3 Release 2.7.1. 2022-10-17 22:24:20 +02:00
Felix Fontein 82aa1480af Prepare 2.7.1 release. 2022-10-17 21:41:04 +02:00
Felix Fontein 516be406e0
Improve import error handling for ACME modules (#519)
* Improve import error handling for ACME modules

* Update plugins/module_utils/acme/acme.py

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2022-10-17 21:38:54 +02:00
Felix Fontein 18502d5250 Release 2.7.0. 2022-09-23 07:40:12 +02:00
Felix Fontein b3f589df62
Action plugin support code: ensure compatibility with newer versions of ansible-core (#515)
* Only access C.STRING_CONVERSION_ACTION for old ansible-base / Ansible versions.

* Always use self.__xxx instead of xxx directly.
2022-09-23 07:02:46 +02:00
Felix Fontein 8ebf1279f9 Prepare 2.7.0 release. 2022-09-23 06:48:26 +02:00
Felix Fontein c24e5c63e8
acme modules: also support 503 for retries (#513)
* Also support 503 for retries.

* Forgot to adjust status code comparison.

* Also support 408.
2022-09-21 13:50:26 +02:00
Felix Fontein ed52123206 Release 2.6.0. 2022-09-19 20:46:26 +02:00
Felix Fontein d10bcd3d6c Fix fragment. 2022-09-19 20:46:13 +02:00
Felix Fontein 45e81a1b0c Prepare 2.6.0 release. 2022-09-19 20:11:29 +02:00
Felix Fontein a0d862e1f1
Support 429 Too Many Requests for acme module_utils. (#508) 2022-09-19 20:10:03 +02:00
Andrew Pantuso 1dcc135da5
feat: add private_key_format choices for openssh_keypair (#511)
* feat: add private_key_format choices for openssh_keypair

* chore: add changelog fragment
2022-09-18 20:10:29 -04:00
Felix Fontein 95626abdd3
Make mostly reuse conformant (#502)
* Add .license files.

* Update README.

* Normalize licenses test.

* Add reuse GHA.

* Add blanket rule for changelog fragments.

* Add .license file for vendored third-party certificates.

* Fix workflow's permissions.

* Revert "Add .license file for vendored third-party certificates."

This reverts commit 35e106867c.

* Make reuse lint test optional.

* Add exceptions.

* Update README.

* Improve reuse test.
2022-09-13 19:13:04 +00:00
Felix Fontein 4428daa411 Release 2.5.0. 2022-08-04 23:06:49 +02:00
Felix Fontein f821fa0f2d Prepare 2.5.0 release. 2022-08-04 22:47:16 +02:00
Felix Fontein 6bf3ef47e1
Move licenses to LICENSES/, use SPDX-License-Identifier, mention all licenses in galaxy.yml (#491)
* Add SPDX license identifiers, mention all licenses in galaxy.yml.

* Add default copyright headers.

* Add headers for documents.

* Fix/add more copyright statements.

* Add copyright / license info for vendored code.

* Add extra sanity test.

* Add changelog fragment.

* Comment PSF-2.0 license out in galaxy.yml for now.

* Remove colon after 'Copyright'.

* Avoid colon after 'Copyright' in lint script.

* Mention correct filename.

* Add BSD-3-Clause.

* Improve lint script.

* Update README.

* Symlinks...
2022-07-21 07:27:26 +02:00
Felix Fontein 4dcbbfba5b Release 2.4.0. 2022-07-09 13:20:28 +02:00
Felix Fontein 036c4c8e6f Prepare 2.4.0. 2022-07-09 13:19:48 +02:00
Felix Fontein 9ed4526fee
openssl_pkcs12: fix crash when trying to get non-existing other certificates (#487)
* Fix crash when trying to get non-existing other certificates.

* Add test.
2022-07-07 22:30:22 +02:00
Felix Fontein d60d3fe1cb Revert "Revert "Revert "Revert "Revert "Revert "Deprecate Ansible 2.9 and ansible-base 2.10 support. (#460)""""""
This reverts commit 4a1842c004.
2022-06-21 12:21:46 +02:00
Felix Fontein a554a588c9 Release 2.3.4. 2022-06-21 12:11:22 +02:00
Felix Fontein 4a1842c004 Revert "Revert "Revert "Revert "Revert "Deprecate Ansible 2.9 and ansible-base 2.10 support. (#460)"""""
This reverts commit 39ec208171.
2022-06-21 12:09:00 +02:00
Felix Fontein 39ec208171 Revert "Revert "Revert "Revert "Deprecate Ansible 2.9 and ansible-base 2.10 support. (#460)""""
This reverts commit f5ccc1516b.
2022-06-17 09:26:38 +02:00
Felix Fontein 5af4a16e57 Release 2.3.3. 2022-06-17 08:25:13 +02:00
Felix Fontein fc07de73e3 Prepare 2.3.3 release. 2022-06-17 08:24:47 +02:00
Felix Fontein f5ccc1516b Revert "Revert "Revert "Deprecate Ansible 2.9 and ansible-base 2.10 support. (#460)"""
(So we can do yet another bugfix release.)

This reverts commit cb77d81f8d.
2022-06-17 08:24:03 +02:00
Felix Fontein de0ec1f739
Add Apache 2.0 license; simplify and standardize license headers (#478)
* Add Apache 2.0 license for Apache 2.0 licensed parts.

* Unify license headers.

* Move additional licenses to licenses/.

* Revert "Move additional licenses to licenses/."

This reverts commit c12b22de1c.
2022-06-17 08:20:40 +02:00
Songmin Li b29f238083
Fix ValueError: excluded_subtrees must be a non-empty list or None (#481) 2022-06-17 07:53:07 +02:00
Felix Fontein 2941bb9bb8 Prepare 2.4.0 release. 2022-06-15 22:16:49 +02:00
Felix Fontein 297b44f24b
x509_crl: do not crash when signing with Ed25519 or Ed448 (#475)
* Do not crash when signing with Ed25519 or Ed448.

* Forgot replace.
2022-06-15 22:06:40 +02:00
Felix Fontein cb77d81f8d Revert "Revert "Deprecate Ansible 2.9 and ansible-base 2.10 support. (#460)""
This reverts commit 798d12b499.
2022-06-02 12:52:58 +02:00
Felix Fontein 9289ce8534 Release 2.3.2. 2022-06-02 12:28:12 +02:00
Felix Fontein 798d12b499 Revert "Deprecate Ansible 2.9 and ansible-base 2.10 support. (#460)"
(This is so we can do a bugfix release now. Deprecations are not alloewd in bugfix releases.)

This reverts commit 74960eaeac.
2022-06-02 07:49:28 +02:00
Felix Fontein 5146760def Adjust release summary, since there are other fragments. 2022-06-02 07:49:16 +02:00
Felix Fontein 48649d50b5 Prepare 2.3.2 release. 2022-06-02 07:46:42 +02:00
Felix Fontein ccd66419f4
Add simplified_bsd.txt license file (#467)
* Add simplified_bsd.txt and adjust references.

* Add changelog.
2022-06-02 07:45:50 +02:00
Felix Fontein 74960eaeac
Deprecate Ansible 2.9 and ansible-base 2.10 support. (#460) 2022-05-20 14:45:56 +02:00
Felix Fontein c49102d688
certificate_complete_chain: do not stop execution on unsupported algorithm (#457)
* Do not stop execution on unsupported algorithm.

* Fix typo.
2022-05-20 07:22:35 +02:00
Felix Fontein ffc0ab2d40 Release 2.3.1. 2022-05-16 12:27:29 +02:00
Felix Fontein 5664bfe4b6
Add PSF-license.txt file. (#453) 2022-05-16 07:40:04 +02:00
Felix Fontein 4074ff4132 Prepare 2.3.1 release. 2022-05-16 07:13:15 +02:00
Felix Fontein 5641e2ac9b Release 2.3.0. 2022-05-09 20:53:39 +02:00
Felix Fontein 4cf951596f
Improve handling of IDNA/Unicode domains (#436)
* Prepare IDNA/Unicode conversion code. Use to normalize input.

* Use IDNA library first (IDNA2008) and Python's IDNA2003 implementation as a fallback.

* Make sure idna is installed.

* Add changelog fragment.

* 'punycode' → 'idna'.

* Add name_encoding options and tests.

* Avoid invalid character for IDNA2008.

* Linting.

* Forgot to upate value.

* Work around cryptography bug. Fix port handling for URIs.

* Forgot other place sensitive to cryptography bug.

* Forgot one. (Will likely still fail.)

* Decode IDNA in _compress_entry() to avoid comparison screw-ups.

* Work around Python 3.5 problem in Ansible 2.9's default test container.

* Update changelog fragment.

* Fix error, add tests.

* Python 2 compatibility.

* Update requirements.
2022-05-09 19:57:14 +02:00
Felix Fontein 90efcc1ca7
Add privatekey_content option. (#452) 2022-05-09 19:56:08 +02:00
Felix Fontein 43665a3892 Prepare 2.3.0 release. 2022-05-03 19:24:20 +02:00
Felix Fontein 640bdbc066
Add EE support (#440)
* Add EE files.

* Install cryptography and PyOpenSSL from PyPi.

* Revert "Install cryptography and PyOpenSSL from PyPi."

This reverts commit 6b90a1efae.

* Only run test when cryptography has a new enough version.

* And another one.

* Extend changelog.
2022-05-03 19:22:55 +02:00
Jonas Verhofsté c16d9f78b8
Make request timeout configurable for all acme modules (#448)
* Make request timeout configurable for all acme modules

Fixes #447.

* Log change made in #448
2022-05-03 17:29:38 +02:00
Felix Fontein 91f192ce5b
Fix main for new cryptography 37.0.0 release (#445)
* 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.
2022-04-26 22:18:37 +02:00
Felix Fontein 9d03178b00
Fix crash in x509_crl when certificate issuer is specified (#441)
* Fix x509_crl certificate issuer issue.

* Add tests.

* Add changelog fragment.
2022-04-18 08:17:27 +02:00
Yauhen 041fff5057
Add persistent and perf options to the luks_device (#434)
Read and write work queue significantly degrades performance on
SSD/NVME devices[1].

In Debian 11 crypttab does not support no-read-workqueue and
no-write-workqueue flags, so the persistent flag is workaround: once
opened with perf parameters persists forever.

[1] https://blog.cloudflare.com/speeding-up-linux-disk-encryption/

Signed-off-by: Yauhen Artsiukhou <jsirex@gmail.com>
2022-04-10 14:30:10 +02:00
Felix Fontein 025091c3fb Release 2.2.4 2022-03-22 13:17:36 +01:00
Felix Fontein b0cede8231 Prepare 2.2.4 release. 2022-03-22 07:31:54 +01:00
Andrew Pantuso 033bab7db1
openssh_* - catch and report top-level exceptions via `fail_json` (#417)
* ensure exceptions are properly reported

* adding changelog fragment

* applying review suggestions

* typo

* adding back exception msg
2022-03-08 13:23:09 +01:00
Felix Fontein f82dcbea21 Release 2.2.3. 2022-03-04 07:38:44 +01:00
Felix Fontein 67f511b5ad Prepare 2.2.3 release. 2022-03-03 21:18:07 +01:00
Felix Fontein 0d4b3ed991
Fix parsing of lsblk output. (#410) 2022-03-02 13:48:38 +01:00
Felix Fontein b952b103e2 Releasing 2.2.2. 2022-02-21 22:11:55 +01:00
Felix Fontein c85659ebfc Prepare 2.2.2 release. 2022-02-19 18:55:41 +01:00
Felix Fontein 28729657ac
x509_certificate: check existing certificate's signature for selfsigned and ownca provider (#407)
* Verify whether signature matches.

* Add changelog fragment.

* Forgot imports.

* Fix wrong name.

* Check whether the CA private key fits to the CA certificate. Use correct key in tests.

* Refactor code.
2022-02-16 07:38:11 +01:00
Felix Fontein 3ebc132c03
Regenerate certificate on CA's subject change. (#402) 2022-02-14 18:04:29 +01:00
Felix Fontein 11a14543c8
certificate_complete_chain: handle duplicate intermediate subjects (#403)
* Allow multiple intermediate CAs to have same subject.

* Add tests.

* Fix test name.

* Don't use CN for SAN.

* Make a bit more compatible.

* Include jinja2 compat for CentOS 6.
2022-02-14 13:29:19 +01:00
Felix Fontein 8a74b3e259 Release 2.2.1. 2022-02-05 21:28:47 +01:00
Felix Fontein a9fcd584e9 Prepare 2.2.1 release. 2022-02-05 20:18:32 +01:00
Andrew Pantuso a307618872
openssh_cert - fix full_idempotence for host certificates (#396)
* fixing host cert idempotence

* adding changelog fragment
2022-02-04 20:53:50 +01:00
Felix Fontein 90da233341 Release 2.2.0. 2022-02-01 05:49:27 +01:00
Felix Fontein 9faed1dad0 Prepare 2.2.0 release. 2022-01-31 06:02:48 +01:00
Felix Fontein ea2e45d63f
Set LANG and similar env variables to prevent translated cryptsetup output. (#388) 2022-01-30 21:30:56 +01:00
JochenKorge b339e71973
Added 'ignore_timestamps' parameter (#381)
* Added 'ignore_timestamps' parameter

* Update plugins/modules/openssh_cert.py

Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>

* Update plugins/modules/openssh_cert.py

Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>

* Update plugins/modules/openssh_cert.py

Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>

* Added fragment

* Update plugins/modules/openssh_cert.py

Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>

* added ignore_timestamps to example

* corrected styling

* fixed styling (again)

* Update changelogs/fragments/381_openssh_cert_add_ignore_timestamps.yml

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

* splitted description as suggested by felixfontein

* fixed linebreak

* Mentioned ignore_timestamps in regenerate

Co-authored-by: Andrew Pantuso <ajpantuso@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-20 16:15:50 +01:00
Felix Fontein 950d1d072f Release 2.1.0. 2022-01-10 22:48:03 +01:00
Felix Fontein cb14e73c61 Prepare 2.1.0 release. 2022-01-10 21:03:19 +01:00
Felix Fontein 62272296da
Small docs improvements (#374)
* Small improvements.

* Document behavior changes.
2022-01-10 12:05:09 +00:00
Felix Fontein 46f39efc43
Use vendored copy of distutils.version. (#369) 2022-01-05 21:30:11 +01:00
Felix Fontein 6ee238d961
certificate_complete_chain: avoid infinite loops, and double roots when root certificate was already part of chain (#360)
* Avoid infinite loops, and double roots when root certificate was already part of chain.

* Refactor tests for readability.
2022-01-04 07:00:09 +01:00
Felix Fontein a539cd6939
Prepare for distutils.version being removed in Python 3.12 (#353)
* 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.
2021-12-24 11:28:14 +01:00
Felix Fontein 605cf2631e Release 2.0.2. 2021-12-20 20:20:32 +01:00
Felix Fontein ee196fd8a3 Prepare 2.0.2 release. 2021-12-20 20:15:27 +01:00
Felix Fontein bd2270fb05 Release 2.0.1. 2021-11-22 11:41:56 +01:00
Felix Fontein 3f40795a98
Extension parsing: add new fallback code which uses the new cryptography API (#331)
* Add new code as fallback which re-serializes de-serialized extensions using the new cryptography API.

* Forgot Base64 encoding.

* Add extension by OID tests.

* There's one value which is different with the new code.

* Differences in CI.

* Working around older Jinjas.

* Value depends on which SAN was included.

* Force complete CI run now since cryptography 36.0.0 is out.

ci_complete
2021-11-22 07:42:49 +01:00
Felix Fontein 73bc0f5de7
Use new PKCS#12 deserialization code from cryptography 36.0.0 if available (#302)
* Use new PKCS#12 deserialization code from cryptography 36.0.0 if available.

* Refactor into smaller functions.

* Force complete CI run now since cryptography 36.0.0 is out.

ci_complete
2021-11-22 07:41:54 +01:00
Felix Fontein f832c0a4ac Fix missing s. 2021-11-22 07:41:39 +01:00
Felix Fontein 10579c8834 Prepare 2.0.1 release. 2021-11-22 07:40:23 +01:00
Felix Fontein 5de50b9f91
Fix compatibility to fetch_url change in ansible-core devel (#339)
* Fix compatibility to fetch_url change in ansible-core devel.

* Adjust tests.
2021-11-17 21:26:49 +01:00
Felix Fontein 2d388bf8d0
This is no longer a problem with the dev version of cryptography. (#335) 2021-11-13 17:59:17 +01:00
Felix Fontein ebbfd7c56f
luks_device: add built-in signature wiper to work around older wipefs versions with LUKS2 containers (#327)
* Use 'cryptsetup erase' to kill LUKS signature.

* Adjust unit test.

* Use own wiper for LUKS headers.

* Add comments.

* Fix tests.

* Update changelog.

* Remove 'cryptsetup erase'.

* Improve error messages.
2021-11-11 06:59:35 +01:00
Felix Fontein 51b6bb210d
acme_certificate: fix crash when using fullchain_dest (#324)
* Fix crash when using fullchain_dest.

* Adjust changelog.

* Update plugins/module_utils/acme/backend_cryptography.py

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-11-05 08:51:43 +01:00
Felix Fontein e5acd27c9b Release 2.0.0. 2021-11-01 19:18:03 +01:00
Felix Fontein e6cd66df53
Add release summary. (#319) 2021-11-01 18:53:46 +01:00
Felix Fontein 589e7c72ef
Allow to specify subject (for CSRs) and issuer (for CRLs) ordered (#316)
* Allow to specify subject (for CSRs) and issuer (for CRLs) ordered.

* Forgot import.

* Apply suggestions from code review

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Apply suggestions from code review

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Fix typo.

* Simplify error handling, reject empty values outright.

* Document d497231e1c.

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-10-31 15:05:04 +01:00
Felix Fontein ecbd44df22
Add warning for ASN.1 encoded extension values returned by some modules (#318)
* Add warning that ASN.1 encoded extension values returned by some modules might not reflect the exact byte sequence in the source file anymore depending on the cryptography version.

* Apply suggestions from code review

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-10-31 14:34:33 +01:00
Felix Fontein 4ab2ed8b77
Add ignore_timestamps option. (#317) 2021-10-30 16:34:27 +02:00
Felix Fontein eb8dabce84
Improve Python 2 Unicode handling. (#313) 2021-10-22 07:15:20 +02:00
Felix Fontein c5df302faa
openssl_privatekey_info: disable private key consistency checks by default (#309)
* Disable private key consistency checks by default.

* Improve formulations, mention side-channel attacks.
2021-10-20 18:28:22 +02:00
Felix Fontein a581f1ebcd
Remove other deprecations (#290)
* Remove deprecated redirects.

* Remove deprecations.

* Add changelog fragment.

* Add some forgotten pieces.

* Bump version to 2.0.0.

* Fix formulation.
2021-10-16 21:00:48 +02:00
Felix Fontein 5f1efb6f7e
Remove assertonly (#289)
* Remove assertonly backend.

* Remove assertonly tests.

* The expired test is basically a test of assertonly.

* Replace assertonly verification by _info + assert.
2021-10-10 10:24:00 +02:00
Felix Fontein 871a185ecb
Remove vendored copy of ipaddress (#287)
* Remove vendored copy of ipaddress.

* Forgot an import.

* Remove sanity ignores and checks related to ipaddress.

* Remove octal IPv4 address.

Such IPs are no longer accepted by ipaddress in Python's standard library (CVE-2021-29921).

* Remove unused import.

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>

Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
2021-10-06 14:53:40 +02:00
Felix Fontein d6c0d53442
Fix PKCS#12 friendly name extraction for cryptography 35.0.0. (#296) 2021-10-03 20:25:24 +02:00
Felix Fontein a2a7d94055
Support cryptography 35.0.0 for all modules except openssl_pkcs12 (#294)
* Add some workarounds for cryptography 35.0.0.

* Make fix work with very old cryptography versions as well (which supported multiple backends).

* [TEMP] Disable openssl_pkcs12 tests to see whether everything else works.

* Revert "[TEMP] Disable openssl_pkcs12 tests to see whether everything else works."

This reverts commit 3f905bc795.

* Add changelog fragment.

* Remove unnecessary assignment.

* Simplify code change.

* [TEMP] Disable openssl_pkcs12 tests to see whether everything else works.

* Revert "[TEMP] Disable openssl_pkcs12 tests to see whether everything else works."

This reverts commit fdb210528e.
2021-10-03 16:53:22 +02:00
Felix Fontein 04958ece31
Deprecate ACME v1 (#288)
* Deprecate ACME v1.

* Fix syntax error.
2021-09-29 06:44:31 +02:00
Felix Fontein 838bdd711b
Make Dirname (de)serialization conformant to RFC 4514 (#274)
* Adjust dirName serialization to RFC 4514.

* Adjust deserialization to RFC 4514.

* Add changelog fragment.

* Use Unicode strings, and work around Python 2 and Python 3 differences and problems with old cryptography versions.

* Work with bytes, not Unicode strings, to handle escaping of Unicode endpoints correctly.
2021-09-28 18:15:38 +02:00
Felix Fontein f644db3c79
Remove PyOpenSSL backends (except for openssl_pkcs12) (#273)
* Remove Ubuntu 16.04 (Xenial Xerus) from CI.

* Removing PyOpenSSL backend from everywhere but openssl_pkcs12.

* Remove PyOpenSSL support from module_utils that's not needed for openssl_pkcs12.

* Add changelog fragment.
2021-09-28 17:46:35 +02:00
Felix Fontein d784e0a52b Release 1.9.4. 2021-09-28 17:17:41 +02:00
Felix Fontein d73a2942a2 Prepare 1.9.4 release. 2021-09-28 16:53:56 +02:00
Felix Fontein 63f4598737
acme_challenge_cert_helper: fail better to avoid crashes in Ansible (#282)
* Prevent acme_challenge_cert_helper triggering a bug in Ansible.

* Add changelog fragment.
2021-09-17 19:35:43 +02:00
Felix Fontein 598cdf0a21
Older openssl versions (1.0.1/1.0.2) do not seem to support '-' for /dev/stdin. (#279) 2021-09-15 20:42:52 +02:00
Felix Fontein d90cc5142b Release 1.9.3. 2021-09-14 08:15:32 +02:00
Felix Fontein 37aab65396 Prepare 1.9.3 release. 2021-09-14 07:14:03 +02:00
Felix Fontein baff003ea8 Fix changelog from last time. 2021-09-14 07:13:25 +02:00
Felix Fontein 03427e35a7
Fix idempotency for non-ASCII string comparisons. (#271) 2021-09-14 07:06:35 +02:00
Felix Fontein a9e358ea57 Bugfix release 1.9.2. 2021-08-30 22:01:16 +02:00
Felix Fontein ffcdbc5d0c Add non-existing 1.9.1 release. 2021-08-30 22:00:39 +02:00