Skip to content

Commit

Permalink
Refactor x509_certificate module, add x509_certificate_pipe module (#135
Browse files Browse the repository at this point in the history
)

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Fix another broken example.

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

This reverts commit 6ee5d7d.

* ci_complete

* Apply suggestions from code review

Co-authored-by: MarkusTeufelberger <[email protected]>

* 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 <[email protected]>
Co-authored-by: MarkusTeufelberger <[email protected]>
  • Loading branch information
3 people committed Nov 24, 2020
1 parent 86b3973 commit 69335a8
Show file tree
Hide file tree
Showing 22 changed files with 3,239 additions and 2,364 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/135-x509_certificate-entrust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "x509_certificate - fix ``entrust`` provider, which was broken since community.crypto 0.1.0 due to a feature added before the collection move (https://github.com/ansible-collections/community.crypto/pull/135)."
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
minor_changes:
- "openssl_privatekey - refactor module to allow code re-use by openssl_privatekey_pipe (https://github.com/ansible-collections/community.crypto/pull/119)."
- "openssl_csr - refactor module to allow code re-use by openssl_csr_pipe (https://github.com/ansible-collections/community.crypto/pull/123)."
- "x509_certificate - refactor module to allow code re-use by x509_certificate_pipe (https://github.com/ansible-collections/community.crypto/pull/135)."
587 changes: 587 additions & 0 deletions plugins/doc_fragments/module_certificate.py

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions plugins/doc_fragments/module_csr.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ class ModuleDocFragment(object):
OCSP Must Staple is as requested, and if the request was signed by the given private key.
seealso:
- module: community.crypto.x509_certificate
- module: community.crypto.x509_certificate_pipe
- module: community.crypto.openssl_dhparam
- module: community.crypto.openssl_pkcs12
- module: community.crypto.openssl_privatekey
- module: community.crypto.openssl_privatekey_pipe
- module: community.crypto.openssl_publickey
- module: community.crypto.openssl_csr_info
'''
2 changes: 2 additions & 0 deletions plugins/doc_fragments/module_privatekey.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ class ModuleDocFragment(object):
default: full_idempotence
seealso:
- module: community.crypto.x509_certificate
- module: community.crypto.x509_certificate_pipe
- module: community.crypto.openssl_csr
- module: community.crypto.openssl_csr_pipe
- module: community.crypto.openssl_dhparam
- module: community.crypto.openssl_pkcs12
- module: community.crypto.openssl_publickey
Expand Down
Loading

0 comments on commit 69335a8

Please sign in to comment.