mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-06 21:33:00 +00:00
Fix assert_required_cryptography_version() calls.
This commit is contained in:
@@ -330,7 +330,9 @@ def select_backend(module, provider):
|
||||
"""
|
||||
provider.validate_module_args(module)
|
||||
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
|
||||
if provider.needs_version_two_certs(module):
|
||||
# TODO: remove
|
||||
|
||||
@@ -434,5 +434,7 @@ def get_certificate_info(module, content, prefer_one_fingerprint=False):
|
||||
|
||||
|
||||
def select_backend(module, content):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
return CertificateInfoRetrievalCryptography(module, content)
|
||||
|
||||
@@ -84,7 +84,9 @@ class CRLInfoRetrieval:
|
||||
|
||||
|
||||
def get_crl_info(module, content, list_revoked_certificates=True):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
info = CRLInfoRetrieval(
|
||||
module, content, list_revoked_certificates=list_revoked_certificates
|
||||
)
|
||||
|
||||
@@ -733,7 +733,9 @@ class CertificateSigningRequestCryptographyBackend(CertificateSigningRequestBack
|
||||
|
||||
|
||||
def select_backend(module):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
return CertificateSigningRequestCryptographyBackend(module)
|
||||
|
||||
|
||||
|
||||
@@ -348,7 +348,9 @@ def get_csr_info(
|
||||
|
||||
|
||||
def select_backend(module, content, validate_signature=True):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
return CSRInfoRetrievalCryptography(
|
||||
module, content, validate_signature=validate_signature
|
||||
)
|
||||
|
||||
@@ -542,7 +542,9 @@ class PrivateKeyCryptographyBackend(PrivateKeyBackend):
|
||||
|
||||
|
||||
def select_backend(module):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
return PrivateKeyCryptographyBackend(module)
|
||||
|
||||
|
||||
|
||||
@@ -248,7 +248,9 @@ class PrivateKeyConvertCryptographyBackend(PrivateKeyConvertBackend):
|
||||
|
||||
|
||||
def select_backend(module):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
return PrivateKeyConvertCryptographyBackend(module)
|
||||
|
||||
|
||||
|
||||
@@ -297,7 +297,9 @@ def select_backend(
|
||||
return_private_key_data=False,
|
||||
check_consistency=False,
|
||||
):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
return PrivateKeyInfoRetrievalCryptography(
|
||||
module,
|
||||
content,
|
||||
|
||||
@@ -144,5 +144,7 @@ def get_publickey_info(module, content=None, key=None, prefer_one_fingerprint=Fa
|
||||
|
||||
|
||||
def select_backend(module, content=None, key=None):
|
||||
assert_required_cryptography_version(MINIMAL_CRYPTOGRAPHY_VERSION)
|
||||
assert_required_cryptography_version(
|
||||
module, minimum_cryptography_version=MINIMAL_CRYPTOGRAPHY_VERSION
|
||||
)
|
||||
return PublicKeyInfoRetrievalCryptography(module, content=content, key=key)
|
||||
|
||||
Reference in New Issue
Block a user