Deprecate PyOpenSSL. (#831)
parent
abb0d67774
commit
db04914ab6
|
@ -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)."
|
|
@ -153,6 +153,7 @@ options:
|
||||||
V(auto) will always result in C(pyopenssl) to be chosen for backwards compatibility.
|
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(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.
|
- 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
|
type: str
|
||||||
default: auto
|
default: auto
|
||||||
choices: [auto, cryptography, pyopenssl]
|
choices: [auto, cryptography, pyopenssl]
|
||||||
|
@ -737,8 +738,8 @@ def select_backend(module, backend):
|
||||||
'pyOpenSSL >= {0}, < {1}'.format(MINIMAL_PYOPENSSL_VERSION, MAXIMAL_PYOPENSSL_VERSION)
|
'pyOpenSSL >= {0}, < {1}'.format(MINIMAL_PYOPENSSL_VERSION, MAXIMAL_PYOPENSSL_VERSION)
|
||||||
)
|
)
|
||||||
module.fail_json(msg=msg, exception=PYOPENSSL_IMP_ERR)
|
module.fail_json(msg=msg, exception=PYOPENSSL_IMP_ERR)
|
||||||
# module.deprecate('The module is using the PyOpenSSL backend. This backend has been deprecated',
|
module.deprecate('The module is using the PyOpenSSL backend. This backend has been deprecated',
|
||||||
# version='x.0.0', collection_name='community.crypto')
|
version='3.0.0', collection_name='community.crypto')
|
||||||
return backend, PkcsPyOpenSSL(module)
|
return backend, PkcsPyOpenSSL(module)
|
||||||
elif backend == 'cryptography':
|
elif backend == 'cryptography':
|
||||||
if not CRYPTOGRAPHY_FOUND:
|
if not CRYPTOGRAPHY_FOUND:
|
||||||
|
|
Loading…
Reference in New Issue