Skip to content

Commit

Permalink
Deprecate PyOpenSSL. (#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored Dec 30, 2024
1 parent abb0d67 commit db04914
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
deprecated_features:
- "openssl_pkcs12 - the PyOpenSSL based backend is deprecated and will be removed from community.crypto 3.0.0.
From that point on you need cryptography 3.0 or newer to use this module
(https://github.com/ansible-collections/community.crypto/issues/667, https://github.com/ansible-collections/community.crypto/pull/831)."
5 changes: 3 additions & 2 deletions plugins/modules/openssl_pkcs12.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
V(auto) will always result in C(pyopenssl) to be chosen for backwards compatibility.
- If set to V(pyopenssl), will try to use the L(pyOpenSSL,https://pypi.org/project/pyOpenSSL/) library.
- If set to V(cryptography), will try to use the L(cryptography,https://cryptography.io/) library.
- B(Note) that the V(pyopenssl) backend is deprecated and will be removed from community.crypto 3.0.0.
type: str
default: auto
choices: [auto, cryptography, pyopenssl]
Expand Down Expand Up @@ -737,8 +738,8 @@ def select_backend(module, backend):
'pyOpenSSL >= {0}, < {1}'.format(MINIMAL_PYOPENSSL_VERSION, MAXIMAL_PYOPENSSL_VERSION)
)
module.fail_json(msg=msg, exception=PYOPENSSL_IMP_ERR)
# module.deprecate('The module is using the PyOpenSSL backend. This backend has been deprecated',
# version='x.0.0', collection_name='community.crypto')
module.deprecate('The module is using the PyOpenSSL backend. This backend has been deprecated',
version='3.0.0', collection_name='community.crypto')
return backend, PkcsPyOpenSSL(module)
elif backend == 'cryptography':
if not CRYPTOGRAPHY_FOUND:
Expand Down

0 comments on commit db04914

Please sign in to comment.