Commit Graph

26 Commits (d71637c77d3ec3f08f9e9a3a62f23e906e8eb4df)

Author SHA1 Message Date
Felix Fontein 6b1a3d6e68
Add conversion filters for serial numbers (#713)
* Refactoring.

* Add parse_filter and to_filter plugins.

* Mention filters when serial numbers are accepted or returned.
2024-02-18 21:27:48 +01: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 3bcc0db4fc
Improve examples: use FQCNs and always add name: to tasks (#604)
* Improve examples: use FQCNs and always add name: to tasks.

* Improve formulation.

Co-authored-by: Don Naro <dnaro@redhat.com>

* Accidentally added a period.

---------

Co-authored-by: Don Naro <dnaro@redhat.com>
2023-05-15 21:41:18 +02:00
Felix Fontein ef2bb6d510
Add openssl_csr_info ilter. (#554) 2022-12-31 07:58:37 +01:00
Felix Fontein 7bbe8f467c
Document attributes (#526)
* Add 'acme' action group attribute.

* Compatibility with older ansible-core releases.

* Fix typo.

* Document standard attributes.

* Improve docs.

* Add shortcuts for common combinations.
2022-11-06 21:10:56 +01:00
Felix Fontein 0e15d6cea8
Convert yes/no to true/false. (#503) 2022-08-23 21:33:29 +02:00
Felix Fontein 2dafef1fab
Fix docs (#497)
* Fix docs.

* Fix YAML.

* Prevent crashes with older pyyaml versions.
2022-08-04 20:02:56 +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 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 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 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 9658a34605
Replace ansible.module_utils._text by ansible.module_utils.common.text.converters. (#253) 2021-06-26 13:45:28 +02:00
Felix Fontein 0a0d0f2bdf
openssl_csr_info and x509_certificate_info: return more public key information (#233)
* Return more public key information.

* Make sure bit size is converted to int first.

* Apply suggestions from code review

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

* Remove no longer necessary code.

* Use correct return value's name.

* Add trailing commas.

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-05-19 14:02:45 +02:00
Felix Fontein c0edfb46bb
openssl_csr_info: move main code to module_utils to allow easier implementation of diff mode (#204)
* Move openssl_csr_info code to module_utils.

* Add changelog fragment.

* Apply suggestions from code review

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

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
2021-05-13 22:08:28 +02: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
Felix Fontein 84342fce4e
openssl_csr: add support for name constraints extension (#92)
* Add support for name constraints extension to openssl_csr.

* Linting.

* Add tests.

* Fix IP address general name handling.
2020-08-18 12:23:37 +02:00
Felix Fontein 390cb1ccc1
Prepare release (#75)
* Improve changelog generator config.

* We don't have docs at that URL.

* Require Ansible(-base) 2.9.10 or newer.

Needed for deprecation syntax.

* Update all deprecations from Ansible 2.1x to community.crypto 2.0.0.

* Forgot to check in fixes.

* Shorten lines.

* Fix unit test requirements.

* Fix YAML strings which only had a closing quote.

* Galaxy neither likes uppercase nor spaces in tags.

* General README improvements.

* Add roadmap section to README.

* Next release will be 1.0.0.

* Extend using instructions.

* Tags with dashes are also not allowed.

* Fix changelog link.
2020-07-01 13:49:25 +02:00
Felix Fontein 109edecd78
Add version_added: 1.0.0 for all new features. (#37) 2020-06-29 15:21:35 +02:00
Felix Fontein cb384443e4
cryptography backend: parse dirName, RID and otherName names (#9) 2020-06-21 22:47:48 +02:00
Toshio Kuratomi cc45650e82
Use fqcn for modules listed in M() and seealso. (#72) 2020-06-17 10:29:18 +02:00
Felix Fontein 9e5969a644
Remove ANSIBLE_METADATA from modules. (#49) 2020-05-14 13:22:12 +02:00
Felix Fontein 9a096dd146
Refactor module_utils/crypto.py (#27)
* Refactor module_utils/crypto.py: split up into multiple smaller modules

* Remove superfluous files.

* Fix sanity errors.

* Move CRL entry dumping code to module_utils.

* Move obj2txt usage from CRL modules to module_utils/crpyto/cryptography_crl.

* Move generic I/O functions to plugins/module_utils/io.py.

* Add helper method for retrieving serial number of certificate.

* Add compatibility code into __init__.py.

* Fix syntax error, and add ignore.txt entries for non-empty __init__.
2020-05-12 11:19:42 +02:00
Felix Fontein 5a6858472c
Remove version_added from return values. (#28) 2020-04-13 23:59:40 +02:00
Felix Fontein 4d157b93ee
Use FQCN in examples. (#12) 2020-03-31 16:23:45 +02:00
Felix Fontein 70615300fb Remove dependency on ansible.netcommon collection (#2)
* Get rid of ansible.netcommon requirement by integrating module_utils/compat/ipaddress.py.

* Reorder imports.

* Update ignore.txt for plugins/module_utils/compat/ipaddress.py.

* Linting (flake8 / pep8).

* Remove accidentally commited test for ansible/ansible#66920.
2020-03-29 18:44:40 +02:00
Ansible Core Team a9f45b4d5b Initial commit 2020-03-09 13:11:34 +00:00