mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-08 14:22:56 +00:00
Make all module_utils and plugin_utils private (#887)
* Add leading underscore. Remove deprecated module utils. * Document module and plugin utils as private. Add changelog fragment. * Convert relative to absolute imports. * Remove unnecessary imports.
This commit is contained in:
@@ -106,6 +106,6 @@ This collection is primarily licensed and distributed as a whole under the GNU G
|
|||||||
|
|
||||||
See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.crypto/blob/main/COPYING) for the full text.
|
See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.crypto/blob/main/COPYING) for the full text.
|
||||||
|
|
||||||
Parts of the collection are licensed under the [Apache 2.0 license](https://github.com/ansible-collections/community.crypto/blob/main/LICENSES/Apache-2.0.txt) (`plugins/module_utils/crypto/_obj2txt.py` and `plugins/module_utils/crypto/_objects_data.py`), the [BSD 2-Clause license](https://github.com/ansible-collections/community.crypto/blob/main/LICENSES/BSD-2-Clause.txt) (`plugins/module_utils/ecs/api.py`), the [BSD 3-Clause license](https://github.com/ansible-collections/community.crypto/blob/main/LICENSES/BSD-3-Clause.txt) (`plugins/module_utils/crypto/_obj2txt.py`, `tests/integration/targets/prepare_jinja2_compat/filter_plugins/jinja_compatibility.py`), and the [PSF 2.0 license](https://github.com/ansible-collections/community.crypto/blob/main/LICENSES/PSF-2.0.txt) (`plugins/module_utils/_version.py`). This only applies to vendored files in ``plugins/module_utils/`` and to the ECS module utils.
|
Parts of the collection are licensed under the [Apache 2.0 license](https://github.com/ansible-collections/community.crypto/blob/main/LICENSES/Apache-2.0.txt) (`plugins/module_utils/_crypto/_obj2txt.py` and `plugins/module_utils/_crypto/_objects_data.py`), the [BSD 2-Clause license](https://github.com/ansible-collections/community.crypto/blob/main/LICENSES/BSD-2-Clause.txt) (`plugins/module_utils/_ecs/api.py`), the [BSD 3-Clause license](https://github.com/ansible-collections/community.crypto/blob/main/LICENSES/BSD-3-Clause.txt) (`plugins/module_utils/_crypto/_obj2txt.py`). This only applies to vendored files in ``plugins/module_utils/`` and to the ECS module utils.
|
||||||
|
|
||||||
All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `REUSE.toml`. This conforms to the [REUSE specification](https://reuse.software/spec/).
|
All files have a machine readable `SDPX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `REUSE.toml`. This conforms to the [REUSE specification](https://reuse.software/spec/).
|
||||||
|
|||||||
4
changelogs/fragments/887-module_utils-plugin_utils.yml
Normal file
4
changelogs/fragments/887-module_utils-plugin_utils.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
breaking_changes:
|
||||||
|
- "All module_utils and plugin_utils are now private to the collection and must not be used from other collections or unrelated plugins/modules.
|
||||||
|
Breaking changes in these can happen at any time, even in bugfix releases
|
||||||
|
(https://github.com/ansible-collections/community.crypto/pull/887)."
|
||||||
@@ -8,26 +8,26 @@ import base64
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey import (
|
||||||
get_privatekey_argument_spec,
|
get_privatekey_argument_spec,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.action_module import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
ActionModuleBase,
|
ActionModuleBase,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.argspec import (
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
ArgumentSpec,
|
ArgumentSpec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey import (
|
||||||
PrivateKeyBackend,
|
PrivateKeyBackend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.action_module import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
AnsibleActionModule,
|
AnsibleActionModule,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ class ModuleDocFragment:
|
|||||||
"""
|
"""
|
||||||
Doc fragments for cryptography requirements.
|
Doc fragments for cryptography requirements.
|
||||||
|
|
||||||
Must be kept in sync with plugins/module_utils/cryptography_dep.py.
|
Must be kept in sync with plugins/module_utils/_cryptography_dep.py.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Corresponds to the plugins.module_utils.cryptography_dep.COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION constant
|
# Corresponds to the plugins.module_utils._cryptography_dep.COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION constant
|
||||||
MINIMUM = r"""
|
MINIMUM = r"""
|
||||||
requirements:
|
requirements:
|
||||||
- cryptography >= 3.3
|
- cryptography >= 3.3
|
||||||
|
|||||||
@@ -43,11 +43,11 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.gnupg.cli import (
|
from ansible_collections.community.crypto.plugins.module_utils._gnupg.cli import (
|
||||||
GPGError,
|
GPGError,
|
||||||
get_fingerprint_from_bytes,
|
get_fingerprint_from_bytes,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.gnupg import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._gnupg import (
|
||||||
PluginGPGRunner,
|
PluginGPGRunner,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -278,13 +278,13 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.csr_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.csr_info import (
|
||||||
get_csr_info,
|
get_csr_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.filter_module import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
FilterModuleMock,
|
FilterModuleMock,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -150,14 +150,14 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey_info import (
|
||||||
PrivateKeyParseError,
|
PrivateKeyParseError,
|
||||||
get_privatekey_info,
|
get_privatekey_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.filter_module import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
FilterModuleMock,
|
FilterModuleMock,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -127,14 +127,14 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.publickey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.publickey_info import (
|
||||||
PublicKeyParseError,
|
PublicKeyParseError,
|
||||||
get_publickey_info,
|
get_publickey_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.filter_module import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
FilterModuleMock,
|
FilterModuleMock,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.serial import (
|
from ansible_collections.community.crypto.plugins.module_utils._serial import (
|
||||||
parse_serial,
|
parse_serial,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
split_pem_list,
|
split_pem_list,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ _value:
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.serial import to_serial
|
from ansible_collections.community.crypto.plugins.module_utils._serial import to_serial
|
||||||
|
|
||||||
|
|
||||||
def to_serial_filter(input: int) -> str:
|
def to_serial_filter(input: int) -> str:
|
||||||
|
|||||||
@@ -312,13 +312,13 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_info import (
|
||||||
get_certificate_info,
|
get_certificate_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.filter_module import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
FilterModuleMock,
|
FilterModuleMock,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -159,16 +159,16 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.errors import AnsibleFilterError
|
from ansible.errors import AnsibleFilterError
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.crl_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.crl_info import (
|
||||||
get_crl_info,
|
get_crl_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
identify_pem_format,
|
identify_pem_format,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.filter_module import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
FilterModuleMock,
|
FilterModuleMock,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ import typing as t
|
|||||||
from ansible.errors import AnsibleLookupError
|
from ansible.errors import AnsibleLookupError
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
from ansible.plugins.lookup import LookupBase
|
from ansible.plugins.lookup import LookupBase
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.gnupg.cli import (
|
from ansible_collections.community.crypto.plugins.module_utils._gnupg.cli import (
|
||||||
GPGError,
|
GPGError,
|
||||||
get_fingerprint_from_file,
|
get_fingerprint_from_file,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.plugin_utils.gnupg import (
|
from ansible_collections.community.crypto.plugins.plugin_utils._gnupg import (
|
||||||
PluginGPGRunner,
|
PluginGPGRunner,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,24 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common._collections_compat import Mapping
|
from ansible.module_utils.common._collections_compat import Mapping
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ACMEProtocolException,
|
ACMEProtocolException,
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from .acme import ACMEClient
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
|
ACMEClient,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ACMEAccount:
|
class ACMEAccount:
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
@@ -15,29 +18,29 @@ import typing as t
|
|||||||
from ansible.module_utils.basic import missing_required_lib
|
from ansible.module_utils.basic import missing_required_lib
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible.module_utils.urls import fetch_url
|
from ansible.module_utils.urls import fetch_url
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.backend_cryptography import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backend_cryptography import (
|
||||||
CRYPTOGRAPHY_ERROR,
|
CRYPTOGRAPHY_ERROR,
|
||||||
CRYPTOGRAPHY_MINIMAL_VERSION,
|
CRYPTOGRAPHY_MINIMAL_VERSION,
|
||||||
CRYPTOGRAPHY_VERSION,
|
CRYPTOGRAPHY_VERSION,
|
||||||
HAS_CURRENT_CRYPTOGRAPHY,
|
HAS_CURRENT_CRYPTOGRAPHY,
|
||||||
CryptographyBackend,
|
CryptographyBackend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.backend_openssl_cli import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backend_openssl_cli import (
|
||||||
OpenSSLCLIBackend,
|
OpenSSLCLIBackend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ACMEProtocolException,
|
ACMEProtocolException,
|
||||||
KeyParsingError,
|
KeyParsingError,
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
NetworkException,
|
NetworkException,
|
||||||
format_http_status,
|
format_http_status,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
compute_cert_id,
|
compute_cert_id,
|
||||||
nopad_b64,
|
nopad_b64,
|
||||||
parse_retry_after,
|
parse_retry_after,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.argspec import (
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
ArgumentSpec,
|
ArgumentSpec,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -46,9 +49,13 @@ if t.TYPE_CHECKING:
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.account import (
|
||||||
from .account import ACMEAccount
|
ACMEAccount,
|
||||||
from .backends import CertificateInformation, CryptoBackend
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backends import (
|
||||||
|
CertificateInformation,
|
||||||
|
CryptoBackend,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# -1 usually means connection problems
|
# -1 usually means connection problems
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
@@ -12,41 +15,41 @@ import traceback
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.backends import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backends import (
|
||||||
CertificateInformation,
|
CertificateInformation,
|
||||||
CryptoBackend,
|
CryptoBackend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificates import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
ChainMatcher,
|
ChainMatcher,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
BackendException,
|
BackendException,
|
||||||
KeyParsingError,
|
KeyParsingError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.io import read_file
|
from ansible_collections.community.crypto.plugins.module_utils._acme.io import read_file
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
nopad_b64,
|
nopad_b64,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
cryptography_name_to_oid,
|
cryptography_name_to_oid,
|
||||||
get_not_valid_after,
|
get_not_valid_after,
|
||||||
get_not_valid_before,
|
get_not_valid_before,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.math import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.math import (
|
||||||
convert_int_to_bytes,
|
convert_int_to_bytes,
|
||||||
convert_int_to_hex,
|
convert_int_to_hex,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
extract_first_pem,
|
extract_first_pem,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
parse_name_field,
|
parse_name_field,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
add_or_remove_timezone,
|
add_or_remove_timezone,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -80,8 +83,10 @@ if t.TYPE_CHECKING:
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
from .certificates import CertificateChain, Criterium
|
CertificateChain,
|
||||||
|
Criterium,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CryptographyChainMatcher(ChainMatcher):
|
class CryptographyChainMatcher(ChainMatcher):
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
@@ -16,29 +19,30 @@ import traceback
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.backends import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backends import (
|
||||||
CertificateInformation,
|
CertificateInformation,
|
||||||
CryptoBackend,
|
CryptoBackend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
BackendException,
|
BackendException,
|
||||||
KeyParsingError,
|
KeyParsingError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
nopad_b64,
|
nopad_b64,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.math import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.math import (
|
||||||
convert_bytes_to_int,
|
convert_bytes_to_int,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
ensure_utc_timezone,
|
ensure_utc_timezone,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
from .certificates import Criterium
|
Criterium,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
_OPENSSL_ENVIRONMENT_UPDATE = dict(LANG="C", LC_ALL="C", LC_MESSAGES="C", LC_CTYPE="C")
|
_OPENSSL_ENVIRONMENT_UPDATE = dict(LANG="C", LC_ALL="C", LC_MESSAGES="C", LC_CTYPE="C")
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -10,13 +13,13 @@ import datetime
|
|||||||
import re
|
import re
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
BackendException,
|
BackendException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
UTC,
|
UTC,
|
||||||
ensure_utc_timezone,
|
ensure_utc_timezone,
|
||||||
from_epoch_seconds,
|
from_epoch_seconds,
|
||||||
@@ -31,8 +34,10 @@ if t.TYPE_CHECKING:
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
from .certificates import ChainMatcher, Criterium
|
ChainMatcher,
|
||||||
|
Criterium,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CertificateInformation(t.NamedTuple):
|
class CertificateInformation(t.NamedTuple):
|
||||||
@@ -2,41 +2,51 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.account import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.account import (
|
||||||
ACMEAccount,
|
ACMEAccount,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificates import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
CertificateChain,
|
CertificateChain,
|
||||||
Criterium,
|
Criterium,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.challenges import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.challenges import (
|
||||||
Authorization,
|
Authorization,
|
||||||
wait_for_validation,
|
wait_for_validation,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.io import write_file
|
from ansible_collections.community.crypto.plugins.module_utils._acme.io import (
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.orders import Order
|
write_file,
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.orders import Order
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
pem_to_der,
|
pem_to_der,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backends import (
|
||||||
from .backends import CryptoBackend
|
CryptoBackend,
|
||||||
from .certificates import ChainMatcher
|
)
|
||||||
from .challenges import Challenge
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
|
ChainMatcher,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.challenges import (
|
||||||
|
Challenge,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ACMECertificateClient:
|
class ACMECertificateClient:
|
||||||
@@ -3,25 +3,30 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
der_to_pem,
|
der_to_pem,
|
||||||
process_links,
|
process_links,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
split_pem_list,
|
split_pem_list,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from .acme import ACMEClient
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
|
ACMEClient,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
_CertificateChain = t.TypeVar("_CertificateChain", bound="CertificateChain")
|
_CertificateChain = t.TypeVar("_CertificateChain", bound="CertificateChain")
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
@@ -14,20 +17,21 @@ import time
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ACMEProtocolException,
|
ACMEProtocolException,
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
format_error_problem,
|
format_error_problem,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
nopad_b64,
|
nopad_b64,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
from .acme import ACMEClient
|
ACMEClient,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def create_key_authorization(client: ACMEClient, token: str) -> str:
|
def create_key_authorization(client: ACMEClient, token: str) -> str:
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -12,7 +15,7 @@ import tempfile
|
|||||||
import traceback
|
import traceback
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -3,26 +3,31 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.challenges import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.challenges import (
|
||||||
Authorization,
|
Authorization,
|
||||||
normalize_combined_identifier,
|
normalize_combined_identifier,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ACMEProtocolException,
|
ACMEProtocolException,
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
nopad_b64,
|
nopad_b64,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from .acme import ACMEClient
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
|
ACMEClient,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
_Order = t.TypeVar("_Order", bound="Order")
|
_Order = t.TypeVar("_Order", bound="Order")
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
@@ -14,19 +17,22 @@ import traceback
|
|||||||
import typing as t
|
import typing as t
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.math import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.math import (
|
||||||
convert_int_to_bytes,
|
convert_int_to_bytes,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_now_datetime,
|
get_now_datetime,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from .backends import CertificateInformation, CryptoBackend
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backends import (
|
||||||
|
CertificateInformation,
|
||||||
|
CryptoBackend,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def nopad_b64(data: bytes) -> str:
|
def nopad_b64(data: bytes) -> str:
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
# dynamically by Ansible, still belong to the author of the module, and may assign
|
# dynamically by Ansible, still belong to the author of the module, and may assign
|
||||||
# their own license to the complete work.
|
# their own license to the complete work.
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
# This excerpt is dual licensed under the terms of the Apache License, Version
|
# This excerpt is dual licensed under the terms of the Apache License, Version
|
||||||
# 2.0, and the BSD License. See the LICENSE file at
|
# 2.0, and the BSD License. See the LICENSE file at
|
||||||
# https://github.com/pyca/cryptography/blob/master/LICENSE for complete details.
|
# https://github.com/pyca/cryptography/blob/master/LICENSE for complete details.
|
||||||
@@ -2,9 +2,14 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from ._objects_data import OID_MAP
|
from ansible_collections.community.crypto.plugins.module_utils._crypto._objects_data import (
|
||||||
|
OID_MAP,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
OID_LOOKUP: dict[str, str] = dict()
|
OID_LOOKUP: dict[str, str] = dict()
|
||||||
@@ -14,6 +14,9 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# https://github.com/openssl/openssl/blob/master/LICENSE.txt or LICENSES/Apache-2.0.txt
|
# https://github.com/openssl/openssl/blob/master/LICENSE.txt or LICENSES/Apache-2.0.txt
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
@@ -2,11 +2,14 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion as _LooseVersion,
|
LooseVersion as _LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -18,9 +21,16 @@ except ImportError:
|
|||||||
# Error handled in the calling module.
|
# Error handled in the calling module.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from ._obj2txt import obj2txt
|
from ansible_collections.community.crypto.plugins.module_utils._crypto._obj2txt import (
|
||||||
from .basic import HAS_CRYPTOGRAPHY
|
obj2txt,
|
||||||
from .cryptography_support import CRYPTOGRAPHY_TIMEZONE, cryptography_decode_name
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
|
HAS_CRYPTOGRAPHY,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
|
cryptography_decode_name,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
@@ -17,12 +20,13 @@ from urllib.parse import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto._asn1 import (
|
||||||
|
serialize_asn1_string_as_der,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ._asn1 import serialize_asn1_string_as_der
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import cryptography
|
import cryptography
|
||||||
@@ -68,10 +72,16 @@ except ImportError:
|
|||||||
IDNA_IMP_ERROR = traceback.format_exc()
|
IDNA_IMP_ERROR = traceback.format_exc()
|
||||||
|
|
||||||
from ansible.module_utils.basic import missing_required_lib
|
from ansible.module_utils.basic import missing_required_lib
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._crypto._obj2txt import (
|
||||||
from ._obj2txt import obj2txt
|
obj2txt,
|
||||||
from ._objects import NORMALIZE_NAMES, NORMALIZE_NAMES_SHORT, OID_LOOKUP, OID_MAP
|
)
|
||||||
from .basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto._objects import (
|
||||||
|
NORMALIZE_NAMES,
|
||||||
|
NORMALIZE_NAMES_SHORT,
|
||||||
|
OID_LOOKUP,
|
||||||
|
OID_MAP,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
@@ -3,32 +3,35 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.argspec import (
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
ArgumentSpec,
|
ArgumentSpec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLBadPassphraseError,
|
OpenSSLBadPassphraseError,
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
cryptography_compare_public_keys,
|
cryptography_compare_public_keys,
|
||||||
get_not_valid_after,
|
get_not_valid_after,
|
||||||
get_not_valid_before,
|
get_not_valid_before,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_info import (
|
||||||
get_certificate_info,
|
get_certificate_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
load_certificate,
|
load_certificate,
|
||||||
load_certificate_privatekey,
|
load_certificate_privatekey,
|
||||||
load_certificate_request,
|
load_certificate_request,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
@@ -38,12 +41,13 @@ if t.TYPE_CHECKING:
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
|
CertificatePrivateKeyTypes,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
CertificateIssuerPrivateKeyTypes,
|
CertificateIssuerPrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ..cryptography_support import CertificatePrivateKeyTypes
|
|
||||||
|
|
||||||
|
|
||||||
MINIMAL_CRYPTOGRAPHY_VERSION = COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION
|
MINIMAL_CRYPTOGRAPHY_VERSION = COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION
|
||||||
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -11,7 +14,7 @@ import traceback
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
CertificateBackend,
|
CertificateBackend,
|
||||||
CertificateError,
|
CertificateError,
|
||||||
CertificateProvider,
|
CertificateProvider,
|
||||||
@@ -20,8 +23,9 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.module_bac
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
from ...argspec import ArgumentSpec
|
ArgumentSpec,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class AcmeCertificateBackend(CertificateBackend):
|
class AcmeCertificateBackend(CertificateBackend):
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
@@ -10,24 +13,24 @@ import os
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
get_not_valid_after,
|
get_not_valid_after,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
CertificateBackend,
|
CertificateBackend,
|
||||||
CertificateError,
|
CertificateError,
|
||||||
CertificateProvider,
|
CertificateProvider,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
load_certificate,
|
load_certificate,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.ecs.api import (
|
from ansible_collections.community.crypto.plugins.module_utils._ecs.api import (
|
||||||
ECSClient,
|
ECSClient,
|
||||||
RestOperationException,
|
RestOperationException,
|
||||||
SessionConfigurationException,
|
SessionConfigurationException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_now_datetime,
|
get_now_datetime,
|
||||||
get_relative_time_option,
|
get_relative_time_option,
|
||||||
)
|
)
|
||||||
@@ -35,8 +38,9 @@ from ansible_collections.community.crypto.plugins.module_utils.time import (
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
from ...argspec import ArgumentSpec
|
ArgumentSpec,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -11,7 +14,7 @@ import binascii
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
cryptography_decode_name,
|
cryptography_decode_name,
|
||||||
cryptography_get_extensions_from_cert,
|
cryptography_get_extensions_from_cert,
|
||||||
@@ -19,18 +22,18 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptograp
|
|||||||
get_not_valid_after,
|
get_not_valid_after,
|
||||||
get_not_valid_before,
|
get_not_valid_before,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.publickey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.publickey_info import (
|
||||||
get_publickey_info,
|
get_publickey_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
get_fingerprint_of_bytes,
|
get_fingerprint_of_bytes,
|
||||||
load_certificate,
|
load_certificate,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_now_datetime,
|
get_now_datetime,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -39,12 +42,17 @@ if t.TYPE_CHECKING:
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
|
ArgumentSpec,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
|
AnsibleActionModule,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
|
FilterModuleMock,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import PublicKeyTypes
|
from cryptography.hazmat.primitives.asymmetric.types import PublicKeyTypes
|
||||||
|
|
||||||
from ....plugin_utils.action_module import AnsibleActionModule
|
|
||||||
from ....plugin_utils.filter_module import FilterModuleMock
|
|
||||||
from ...argspec import ArgumentSpec
|
|
||||||
|
|
||||||
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
||||||
|
|
||||||
|
|
||||||
@@ -3,16 +3,19 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
from random import randrange
|
from random import randrange
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLBadPassphraseError,
|
OpenSSLBadPassphraseError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
cryptography_compare_public_keys,
|
cryptography_compare_public_keys,
|
||||||
cryptography_key_needs_digest_for_signing,
|
cryptography_key_needs_digest_for_signing,
|
||||||
@@ -23,17 +26,17 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptograp
|
|||||||
set_not_valid_after,
|
set_not_valid_after,
|
||||||
set_not_valid_before,
|
set_not_valid_before,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
CertificateBackend,
|
CertificateBackend,
|
||||||
CertificateError,
|
CertificateError,
|
||||||
CertificateProvider,
|
CertificateProvider,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
load_certificate,
|
load_certificate,
|
||||||
load_certificate_issuer_privatekey,
|
load_certificate_issuer_privatekey,
|
||||||
select_message_digest,
|
select_message_digest,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_relative_time_option,
|
get_relative_time_option,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -42,12 +45,13 @@ if t.TYPE_CHECKING:
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
|
ArgumentSpec,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
CertificateIssuerPrivateKeyTypes,
|
CertificateIssuerPrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ...argspec import ArgumentSpec
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import cryptography
|
import cryptography
|
||||||
@@ -3,13 +3,16 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
from random import randrange
|
from random import randrange
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
cryptography_key_needs_digest_for_signing,
|
cryptography_key_needs_digest_for_signing,
|
||||||
cryptography_verify_certificate_signature,
|
cryptography_verify_certificate_signature,
|
||||||
@@ -19,15 +22,15 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptograp
|
|||||||
set_not_valid_after,
|
set_not_valid_after,
|
||||||
set_not_valid_before,
|
set_not_valid_before,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
CertificateBackend,
|
CertificateBackend,
|
||||||
CertificateError,
|
CertificateError,
|
||||||
CertificateProvider,
|
CertificateProvider,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
select_message_digest,
|
select_message_digest,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_relative_time_option,
|
get_relative_time_option,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -36,12 +39,13 @@ if t.TYPE_CHECKING:
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
|
ArgumentSpec,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
CertificateIssuerPrivateKeyTypes,
|
CertificateIssuerPrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ...argspec import ArgumentSpec
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import cryptography
|
import cryptography
|
||||||
@@ -2,23 +2,26 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_crl import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_crl import (
|
||||||
TIMESTAMP_FORMAT,
|
TIMESTAMP_FORMAT,
|
||||||
cryptography_decode_revoked_certificate,
|
cryptography_decode_revoked_certificate,
|
||||||
cryptography_dump_revoked,
|
cryptography_dump_revoked,
|
||||||
cryptography_get_signature_algorithm_oid_from_crl,
|
cryptography_get_signature_algorithm_oid_from_crl,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
cryptography_oid_to_name,
|
cryptography_oid_to_name,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
identify_pem_format,
|
identify_pem_format,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
@@ -26,13 +29,16 @@ from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
|
AnsibleActionModule,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
|
FilterModuleMock,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
PrivateKeyTypes,
|
PrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ....plugin_utils.action_module import AnsibleActionModule
|
|
||||||
from ....plugin_utils.filter_module import FilterModuleMock
|
|
||||||
|
|
||||||
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
||||||
|
|
||||||
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -10,17 +13,17 @@ import binascii
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.argspec import (
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
ArgumentSpec,
|
ArgumentSpec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLBadPassphraseError,
|
OpenSSLBadPassphraseError,
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_crl import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_crl import (
|
||||||
REVOCATION_REASON_MAP,
|
REVOCATION_REASON_MAP,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
cryptography_get_basic_constraints,
|
cryptography_get_basic_constraints,
|
||||||
cryptography_get_name,
|
cryptography_get_name,
|
||||||
cryptography_key_needs_digest_for_signing,
|
cryptography_key_needs_digest_for_signing,
|
||||||
@@ -29,17 +32,17 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptograp
|
|||||||
cryptography_parse_relative_distinguished_name,
|
cryptography_parse_relative_distinguished_name,
|
||||||
is_potential_certificate_issuer_public_key,
|
is_potential_certificate_issuer_public_key,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.csr_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.csr_info import (
|
||||||
get_csr_info,
|
get_csr_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
load_certificate_issuer_privatekey,
|
load_certificate_issuer_privatekey,
|
||||||
load_certificate_request,
|
load_certificate_request,
|
||||||
parse_name_field,
|
parse_name_field,
|
||||||
parse_ordered_name_field,
|
parse_ordered_name_field,
|
||||||
select_message_digest,
|
select_message_digest,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
@@ -47,13 +50,14 @@ from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
|
CertificatePrivateKeyTypes,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
CertificateIssuerPrivateKeyTypes,
|
CertificateIssuerPrivateKeyTypes,
|
||||||
PrivateKeyTypes,
|
PrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ..cryptography_support import CertificatePrivateKeyTypes
|
|
||||||
|
|
||||||
_ET = t.TypeVar("_ET", bound="cryptography.x509.ExtensionType")
|
_ET = t.TypeVar("_ET", bound="cryptography.x509.ExtensionType")
|
||||||
|
|
||||||
|
|
||||||
@@ -4,6 +4,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -11,18 +14,18 @@ import binascii
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
cryptography_decode_name,
|
cryptography_decode_name,
|
||||||
cryptography_get_extensions_from_csr,
|
cryptography_get_extensions_from_csr,
|
||||||
cryptography_oid_to_name,
|
cryptography_oid_to_name,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.publickey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.publickey_info import (
|
||||||
get_publickey_info,
|
get_publickey_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
load_certificate_request,
|
load_certificate_request,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
@@ -30,14 +33,17 @@ from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
|
AnsibleActionModule,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
|
FilterModuleMock,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
CertificatePublicKeyTypes,
|
CertificatePublicKeyTypes,
|
||||||
PrivateKeyTypes,
|
PrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ....plugin_utils.action_module import AnsibleActionModule
|
|
||||||
from ....plugin_utils.filter_module import FilterModuleMock
|
|
||||||
|
|
||||||
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
||||||
|
|
||||||
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -11,24 +14,24 @@ import traceback
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.argspec import (
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
ArgumentSpec,
|
ArgumentSpec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey_info import (
|
||||||
PrivateKeyConsistencyError,
|
PrivateKeyConsistencyError,
|
||||||
PrivateKeyParseError,
|
PrivateKeyParseError,
|
||||||
get_privatekey_info,
|
get_privatekey_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
identify_private_key_format,
|
identify_private_key_format,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
get_fingerprint_of_privatekey,
|
get_fingerprint_of_privatekey,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
@@ -36,12 +39,13 @@ from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
|
AnsibleActionModule,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
PrivateKeyTypes,
|
PrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ....plugin_utils.action_module import AnsibleActionModule
|
|
||||||
|
|
||||||
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule]
|
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule]
|
||||||
|
|
||||||
|
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -9,23 +12,23 @@ import traceback
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.argspec import (
|
from ansible_collections.community.crypto.plugins.module_utils._argspec import (
|
||||||
ArgumentSpec,
|
ArgumentSpec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
cryptography_compare_private_keys,
|
cryptography_compare_private_keys,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
identify_private_key_format,
|
identify_private_key_format,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import load_file
|
from ansible_collections.community.crypto.plugins.module_utils._io import load_file
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
@@ -4,27 +4,30 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.math import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.math import (
|
||||||
binary_exp_mod,
|
binary_exp_mod,
|
||||||
quick_is_not_prime,
|
quick_is_not_prime,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.publickey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.publickey_info import (
|
||||||
_get_cryptography_public_key_info,
|
_get_cryptography_public_key_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
get_fingerprint_of_bytes,
|
get_fingerprint_of_bytes,
|
||||||
load_privatekey,
|
load_privatekey,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
@@ -32,13 +35,16 @@ from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
|
AnsibleActionModule,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
|
FilterModuleMock,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
PrivateKeyTypes,
|
PrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ....plugin_utils.action_module import AnsibleActionModule
|
|
||||||
from ....plugin_utils.filter_module import FilterModuleMock
|
|
||||||
|
|
||||||
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
||||||
|
|
||||||
|
|
||||||
@@ -2,19 +2,22 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
get_fingerprint_of_bytes,
|
get_fingerprint_of_bytes,
|
||||||
load_publickey,
|
load_publickey,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
@@ -22,13 +25,16 @@ from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
|
AnsibleActionModule,
|
||||||
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
|
FilterModuleMock,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
PublicKeyTypes,
|
PublicKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ....plugin_utils.action_module import AnsibleActionModule
|
|
||||||
from ....plugin_utils.filter_module import FilterModuleMock
|
|
||||||
|
|
||||||
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
||||||
|
|
||||||
|
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -11,22 +14,14 @@ import os
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
is_potential_certificate_issuer_private_key,
|
is_potential_certificate_issuer_private_key,
|
||||||
is_potential_certificate_private_key,
|
is_potential_certificate_private_key,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
identify_pem_format,
|
identify_pem_format,
|
||||||
)
|
)
|
||||||
|
|
||||||
# These imports are for backwards compatibility:
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import ( # noqa: F401, pylint: disable=unused-import
|
|
||||||
convert_relative_to_datetime,
|
|
||||||
ensure_utc_timezone,
|
|
||||||
get_now_datetime,
|
|
||||||
get_relative_time_option,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from cryptography import x509
|
from cryptography import x509
|
||||||
@@ -36,19 +31,23 @@ except ImportError:
|
|||||||
# Error handled in the calling module.
|
# Error handled in the calling module.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from .basic import OpenSSLBadPassphraseError, OpenSSLObjectError
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
|
OpenSSLBadPassphraseError,
|
||||||
|
OpenSSLObjectError,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
|
CertificatePrivateKeyTypes,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
CertificateIssuerPrivateKeyTypes,
|
CertificateIssuerPrivateKeyTypes,
|
||||||
PrivateKeyTypes,
|
PrivateKeyTypes,
|
||||||
PublicKeyTypes,
|
PublicKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .cryptography_support import CertificatePrivateKeyTypes
|
|
||||||
|
|
||||||
|
|
||||||
# This list of preferred fingerprints is used when prefer_one=True is supplied to the
|
# This list of preferred fingerprints is used when prefer_one=True is supplied to the
|
||||||
# fingerprinting methods.
|
# fingerprinting methods.
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Module utils for cryptography requirements.
|
Module utils for cryptography requirements.
|
||||||
|
|
||||||
@@ -14,16 +17,19 @@ import traceback
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import missing_required_lib
|
from ansible.module_utils.basic import missing_required_lib
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._action_module import (
|
||||||
from ..plugin_utils.action_module import AnsibleActionModule
|
AnsibleActionModule,
|
||||||
from ..plugin_utils.filter_module import FilterModuleMock
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.plugin_utils._filter_module import (
|
||||||
|
FilterModuleMock,
|
||||||
|
)
|
||||||
|
|
||||||
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
GeneralAnsibleModule = t.Union[AnsibleModule, AnsibleActionModule, FilterModuleMock]
|
||||||
|
|
||||||
@@ -8,6 +8,9 @@
|
|||||||
# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)
|
# Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)
|
||||||
# SPDX-License-Identifier: BSD-2-Clause
|
# SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import json
|
import json
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -10,20 +13,21 @@ import stat
|
|||||||
import traceback
|
import traceback
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.utils import (
|
||||||
parse_openssh_version,
|
parse_openssh_version,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.certificate import (
|
||||||
|
OpensshCertificateTimeParameters,
|
||||||
|
)
|
||||||
from cryptography.hazmat.primitives.asymmetric.types import (
|
from cryptography.hazmat.primitives.asymmetric.types import (
|
||||||
CertificateIssuerPrivateKeyTypes,
|
CertificateIssuerPrivateKeyTypes,
|
||||||
PrivateKeyTypes,
|
PrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
from ..certificate import OpensshCertificateTimeParameters
|
|
||||||
|
|
||||||
Param = t.ParamSpec("Param")
|
Param = t.ParamSpec("Param")
|
||||||
|
|
||||||
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -11,17 +14,17 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import missing_required_lib
|
from ansible.module_utils.basic import missing_required_lib
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.backends.common import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.backends.common import (
|
||||||
KeygenCommand,
|
KeygenCommand,
|
||||||
OpensshModule,
|
OpensshModule,
|
||||||
PrivateKey,
|
PrivateKey,
|
||||||
PublicKey,
|
PublicKey,
|
||||||
parse_private_key_format,
|
parse_private_key_format,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.cryptography import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.cryptography import (
|
||||||
CRYPTOGRAPHY_VERSION,
|
CRYPTOGRAPHY_VERSION,
|
||||||
HAS_OPENSSH_SUPPORT,
|
HAS_OPENSSH_SUPPORT,
|
||||||
InvalidCommentError,
|
InvalidCommentError,
|
||||||
@@ -30,12 +33,12 @@ from ansible_collections.community.crypto.plugins.module_utils.openssh.cryptogra
|
|||||||
OpenSSHError,
|
OpenSSHError,
|
||||||
OpensshKeypair,
|
OpensshKeypair,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.utils import (
|
||||||
any_in,
|
any_in,
|
||||||
file_mode,
|
file_mode,
|
||||||
secure_write,
|
secure_write,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import abc
|
import abc
|
||||||
@@ -14,21 +17,23 @@ from datetime import datetime
|
|||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.utils import (
|
||||||
OpensshParser,
|
OpensshParser,
|
||||||
_OpensshWriter,
|
_OpensshWriter,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import UTC as _UTC
|
from ansible_collections.community.crypto.plugins.module_utils._time import UTC as _UTC
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
add_or_remove_timezone as _add_or_remove_timezone,
|
add_or_remove_timezone as _add_or_remove_timezone,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
convert_relative_to_datetime,
|
convert_relative_to_datetime,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from .cryptography import KeyType
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.cryptography import (
|
||||||
|
KeyType,
|
||||||
|
)
|
||||||
|
|
||||||
DateFormat = t.Literal["human_readable", "openssh", "timestamp"]
|
DateFormat = t.Literal["human_readable", "openssh", "timestamp"]
|
||||||
DateFormatStr = t.Literal["human_readable", "openssh"]
|
DateFormatStr = t.Literal["human_readable", "openssh"]
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@@ -2,10 +2,13 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.math import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.math import (
|
||||||
convert_int_to_hex,
|
convert_int_to_hex,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2,13 +2,16 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Note that this module util is **PRIVATE** to the collection. It can have breaking changes at any time.
|
||||||
|
# Do not use this from other collections or standalone plugins/modules!
|
||||||
|
|
||||||
"""Provide version object to compare version numbers."""
|
"""Provide version object to compare version numbers."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# Copyright (c) 2020, Doug Stanley <doug+ansible@technologixllc.com>
|
|
||||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
# This import is only to maintain backwards compatibility
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.utils import ( # noqa: F401, pylint: disable=unused-import
|
|
||||||
parse_openssh_version,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: delete!
|
|
||||||
@@ -167,15 +167,15 @@ account_uri:
|
|||||||
import base64
|
import base64
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.account import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.account import (
|
||||||
ACMEAccount,
|
ACMEAccount,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
KeyParsingError,
|
KeyParsingError,
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -206,18 +206,18 @@ order_uris:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.account import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.account import (
|
||||||
ACMEAccount,
|
ACMEAccount,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
process_links,
|
process_links,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -96,12 +96,12 @@ renewal_info:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -564,30 +564,32 @@ all_chains:
|
|||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.account import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.account import (
|
||||||
ACMEAccount,
|
ACMEAccount,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificates import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
CertificateChain,
|
CertificateChain,
|
||||||
Criterium,
|
Criterium,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.challenges import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.challenges import (
|
||||||
combine_identifier,
|
combine_identifier,
|
||||||
normalize_combined_identifier,
|
normalize_combined_identifier,
|
||||||
split_identifier,
|
split_identifier,
|
||||||
wait_for_validation,
|
wait_for_validation,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.io import write_file
|
from ansible_collections.community.crypto.plugins.module_utils._acme.io import (
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.orders import Order
|
write_file,
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
)
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.orders import Order
|
||||||
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
compute_cert_id,
|
compute_cert_id,
|
||||||
pem_to_der,
|
pem_to_der,
|
||||||
)
|
)
|
||||||
@@ -595,11 +597,11 @@ from ansible_collections.community.crypto.plugins.module_utils.acme.utils import
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.backends import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.backends import (
|
||||||
CertificateInformation,
|
CertificateInformation,
|
||||||
CryptoBackend,
|
CryptoBackend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.challenges import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.challenges import (
|
||||||
Authorization,
|
Authorization,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -53,18 +53,18 @@ RETURN = """#"""
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.account import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.account import (
|
||||||
ACMEAccount,
|
ACMEAccount,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.orders import Order
|
from ansible_collections.community.crypto.plugins.module_utils._acme.orders import Order
|
||||||
|
|
||||||
|
|
||||||
def main() -> t.NoReturn:
|
def main() -> t.NoReturn:
|
||||||
|
|||||||
@@ -373,14 +373,14 @@ account_uri:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificate import (
|
||||||
ACMECertificateClient,
|
ACMECertificateClient,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -319,20 +319,20 @@ selected_chain:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificate import (
|
||||||
ACMECertificateClient,
|
ACMECertificateClient,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificates import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificates import (
|
||||||
CertificateChain,
|
CertificateChain,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -359,14 +359,14 @@ authorizations_by_status:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificate import (
|
||||||
ACMECertificateClient,
|
ACMECertificateClient,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -231,20 +231,20 @@ validating_challenges:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.certificate import (
|
||||||
ACMECertificateClient,
|
ACMECertificateClient,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.challenges import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.challenges import (
|
||||||
Authorization,
|
Authorization,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -162,16 +162,16 @@ import os
|
|||||||
import random
|
import random
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.io import read_file
|
from ansible_collections.community.crypto.plugins.module_utils._acme.io import read_file
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
compute_cert_id,
|
compute_cert_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -112,20 +112,20 @@ RETURN = """#"""
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.account import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.account import (
|
||||||
ACMEAccount,
|
ACMEAccount,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ACMEProtocolException,
|
ACMEProtocolException,
|
||||||
KeyParsingError,
|
KeyParsingError,
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.utils import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.utils import (
|
||||||
nopad_b64,
|
nopad_b64,
|
||||||
pem_to_der,
|
pem_to_der,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -153,20 +153,20 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.io import read_file
|
from ansible_collections.community.crypto.plugins.module_utils._acme.io import read_file
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
set_not_valid_after,
|
set_not_valid_after,
|
||||||
set_not_valid_before,
|
set_not_valid_before,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_now_datetime,
|
get_now_datetime,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -226,12 +226,12 @@ output_json:
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.acme import (
|
||||||
ACMEClient,
|
ACMEClient,
|
||||||
create_backend,
|
create_backend,
|
||||||
create_default_argspec,
|
create_default_argspec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.acme.errors import (
|
from ansible_collections.community.crypto.plugins.module_utils._acme.errors import (
|
||||||
ACMEProtocolException,
|
ACMEProtocolException,
|
||||||
ModuleFailException,
|
ModuleFailException,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -125,10 +125,10 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
split_pem_list,
|
split_pem_list,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -554,20 +554,20 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_bytes
|
from ansible.module_utils.common.text.converters import to_bytes
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
load_certificate,
|
load_certificate,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.ecs.api import (
|
from ansible_collections.community.crypto.plugins.module_utils._ecs.api import (
|
||||||
ECSClient,
|
ECSClient,
|
||||||
RestOperationException,
|
RestOperationException,
|
||||||
SessionConfigurationException,
|
SessionConfigurationException,
|
||||||
ecs_client_argument_spec,
|
ecs_client_argument_spec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import write_file
|
from ansible_collections.community.crypto.plugins.module_utils._io import write_file
|
||||||
|
|
||||||
|
|
||||||
MINIMAL_CRYPTOGRAPHY_VERSION = COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION
|
MINIMAL_CRYPTOGRAPHY_VERSION = COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ import time
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.ecs.api import (
|
from ansible_collections.community.crypto.plugins.module_utils._ecs.api import (
|
||||||
ECSClient,
|
ECSClient,
|
||||||
RestOperationException,
|
RestOperationException,
|
||||||
SessionConfigurationException,
|
SessionConfigurationException,
|
||||||
|
|||||||
@@ -280,18 +280,18 @@ from ssl import (
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
cryptography_get_extensions_from_cert,
|
cryptography_get_extensions_from_cert,
|
||||||
cryptography_oid_to_name,
|
cryptography_oid_to_name,
|
||||||
get_not_valid_after,
|
get_not_valid_after,
|
||||||
get_not_valid_before,
|
get_not_valid_before,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_now_datetime,
|
get_now_datetime,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -287,17 +287,17 @@ import os
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.backends.common import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.backends.common import (
|
||||||
KeygenCommand,
|
KeygenCommand,
|
||||||
OpensshModule,
|
OpensshModule,
|
||||||
PrivateKey,
|
PrivateKey,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.certificate import (
|
||||||
OpensshCertificate,
|
OpensshCertificate,
|
||||||
OpensshCertificateTimeParameters,
|
OpensshCertificateTimeParameters,
|
||||||
parse_option_list,
|
parse_option_list,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ comment:
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.backends.keypair_backend import (
|
from ansible_collections.community.crypto.plugins.module_utils._openssh.backends.keypair_backend import (
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -241,17 +241,17 @@ csr:
|
|||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.csr import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.csr import (
|
||||||
get_csr_argument_spec,
|
get_csr_argument_spec,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
@@ -259,7 +259,7 @@ from ansible_collections.community.crypto.plugins.module_utils.io import (
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.csr import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.csr import (
|
||||||
CertificateSigningRequestBackend,
|
CertificateSigningRequestBackend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -311,10 +311,10 @@ authority_cert_serial_number:
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.csr_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.csr_info import (
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -129,10 +129,10 @@ csr:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.csr import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.csr import (
|
||||||
get_csr_argument_spec,
|
get_csr_argument_spec,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
@@ -140,7 +140,7 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.module_bac
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.csr import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.csr import (
|
||||||
CertificateSigningRequestBackend,
|
CertificateSigningRequestBackend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -136,18 +136,18 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_native
|
from ansible.module_utils.common.text.converters import to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.math import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.math import (
|
||||||
count_bits,
|
count_bits,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -284,26 +284,26 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLBadPassphraseError,
|
OpenSSLBadPassphraseError,
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
parse_pkcs12,
|
parse_pkcs12,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
split_pem_list,
|
split_pem_list,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
load_certificate,
|
load_certificate,
|
||||||
load_certificate_issuer_privatekey,
|
load_certificate_issuer_privatekey,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
@@ -336,7 +336,7 @@ else:
|
|||||||
CRYPTOGRAPHY_HAS_COMPATIBILITY2022 = True
|
CRYPTOGRAPHY_HAS_COMPATIBILITY2022 = True
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ..module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CertificateIssuerPrivateKeyTypes,
|
CertificateIssuerPrivateKeyTypes,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -157,17 +157,17 @@ privatekey:
|
|||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey import (
|
||||||
get_privatekey_argument_spec,
|
get_privatekey_argument_spec,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
@@ -175,7 +175,7 @@ from ansible_collections.community.crypto.plugins.module_utils.io import (
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey import (
|
||||||
PrivateKeyBackend,
|
PrivateKeyBackend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -62,17 +62,17 @@ backup_file:
|
|||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey_convert import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey_convert import (
|
||||||
get_privatekey_argument_spec,
|
get_privatekey_argument_spec,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
@@ -80,7 +80,7 @@ from ansible_collections.community.crypto.plugins.module_utils.io import (
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey_convert import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey_convert import (
|
||||||
PrivateKeyConvertBackend,
|
PrivateKeyConvertBackend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -203,10 +203,10 @@ private_data:
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.privatekey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.privatekey_info import (
|
||||||
PrivateKeyConsistencyError,
|
PrivateKeyConsistencyError,
|
||||||
PrivateKeyParseError,
|
PrivateKeyParseError,
|
||||||
select_backend,
|
select_backend,
|
||||||
|
|||||||
@@ -189,24 +189,24 @@ import os
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLBadPassphraseError,
|
OpenSSLBadPassphraseError,
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.publickey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.publickey_info import (
|
||||||
PublicKeyParseError,
|
PublicKeyParseError,
|
||||||
get_publickey_info,
|
get_publickey_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
get_fingerprint,
|
get_fingerprint,
|
||||||
load_privatekey,
|
load_privatekey,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -155,10 +155,10 @@ public_data:
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.publickey_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.publickey_info import (
|
||||||
PublicKeyParseError,
|
PublicKeyParseError,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -101,11 +101,11 @@ import base64
|
|||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -122,10 +122,10 @@ except ImportError:
|
|||||||
CRYPTOGRAPHY_VERSION = LooseVersion("0.0")
|
CRYPTOGRAPHY_VERSION = LooseVersion("0.0")
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
load_privatekey,
|
load_privatekey,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -90,11 +90,11 @@ import base64
|
|||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.version import (
|
from ansible_collections.community.crypto.plugins.module_utils._version import (
|
||||||
LooseVersion,
|
LooseVersion,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -111,10 +111,10 @@ except ImportError:
|
|||||||
CRYPTOGRAPHY_VERSION = LooseVersion("0.0")
|
CRYPTOGRAPHY_VERSION = LooseVersion("0.0")
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
load_certificate,
|
load_certificate,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -226,33 +226,33 @@ certificate:
|
|||||||
import os
|
import os
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
get_certificate_argument_spec,
|
get_certificate_argument_spec,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_acme import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_acme import (
|
||||||
AcmeCertificateProvider,
|
AcmeCertificateProvider,
|
||||||
add_acme_provider_to_argument_spec,
|
add_acme_provider_to_argument_spec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_entrust import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_entrust import (
|
||||||
EntrustCertificateProvider,
|
EntrustCertificateProvider,
|
||||||
add_entrust_provider_to_argument_spec,
|
add_entrust_provider_to_argument_spec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_ownca import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_ownca import (
|
||||||
OwnCACertificateProvider,
|
OwnCACertificateProvider,
|
||||||
add_ownca_provider_to_argument_spec,
|
add_ownca_provider_to_argument_spec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_selfsigned import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_selfsigned import (
|
||||||
SelfSignedCertificateProvider,
|
SelfSignedCertificateProvider,
|
||||||
add_selfsigned_provider_to_argument_spec,
|
add_selfsigned_provider_to_argument_spec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
@@ -260,7 +260,7 @@ from ansible_collections.community.crypto.plugins.module_utils.io import (
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
CertificateBackend,
|
CertificateBackend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -110,10 +110,10 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
from ansible.module_utils.common.text.converters import to_bytes, to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
PEM_END,
|
PEM_END,
|
||||||
PEM_END_START,
|
PEM_END_START,
|
||||||
PEM_START,
|
PEM_START,
|
||||||
@@ -121,14 +121,14 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import
|
|||||||
identify_pem_format,
|
identify_pem_format,
|
||||||
split_pem_list,
|
split_pem_list,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import (
|
from ansible_collections.community.crypto.plugins.module_utils._io import (
|
||||||
load_file_if_exists,
|
load_file_if_exists,
|
||||||
write_file,
|
write_file,
|
||||||
)
|
)
|
||||||
@@ -137,7 +137,6 @@ from ansible_collections.community.crypto.plugins.module_utils.io import (
|
|||||||
MINIMAL_CRYPTOGRAPHY_VERSION = COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION
|
MINIMAL_CRYPTOGRAPHY_VERSION = COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import cryptography # noqa: F401, pylint: disable=unused-import
|
|
||||||
from cryptography.x509 import load_der_x509_certificate
|
from cryptography.x509 import load_der_x509_certificate
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -394,16 +394,16 @@ import typing as t
|
|||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_info import (
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_relative_time_option,
|
get_relative_time_option,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -120,22 +120,22 @@ certificate:
|
|||||||
|
|
||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
get_certificate_argument_spec,
|
get_certificate_argument_spec,
|
||||||
select_backend,
|
select_backend,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_entrust import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_entrust import (
|
||||||
EntrustCertificateProvider,
|
EntrustCertificateProvider,
|
||||||
add_entrust_provider_to_argument_spec,
|
add_entrust_provider_to_argument_spec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_ownca import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_ownca import (
|
||||||
OwnCACertificateProvider,
|
OwnCACertificateProvider,
|
||||||
add_ownca_provider_to_argument_spec,
|
add_ownca_provider_to_argument_spec,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate_selfsigned import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate_selfsigned import (
|
||||||
SelfSignedCertificateProvider,
|
SelfSignedCertificateProvider,
|
||||||
add_selfsigned_provider_to_argument_spec,
|
add_selfsigned_provider_to_argument_spec,
|
||||||
)
|
)
|
||||||
@@ -143,7 +143,7 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.module_bac
|
|||||||
|
|
||||||
if t.TYPE_CHECKING:
|
if t.TYPE_CHECKING:
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.certificate import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.certificate import (
|
||||||
CertificateBackend,
|
CertificateBackend,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -430,11 +430,11 @@ import typing as t
|
|||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.common.text.converters import to_text
|
from ansible.module_utils.common.text.converters import to_text
|
||||||
from ansible.module_utils.common.validation import check_type_int, check_type_str
|
from ansible.module_utils.common.validation import check_type_int, check_type_str
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLBadPassphraseError,
|
OpenSSLBadPassphraseError,
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_crl import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_crl import (
|
||||||
CRYPTOGRAPHY_TIMEZONE_INVALIDITY_DATE,
|
CRYPTOGRAPHY_TIMEZONE_INVALIDITY_DATE,
|
||||||
REVOCATION_REASON_MAP,
|
REVOCATION_REASON_MAP,
|
||||||
TIMESTAMP_FORMAT,
|
TIMESTAMP_FORMAT,
|
||||||
@@ -447,7 +447,7 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptograp
|
|||||||
set_next_update,
|
set_next_update,
|
||||||
set_revocation_date,
|
set_revocation_date,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptography_support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.cryptography_support import (
|
||||||
CRYPTOGRAPHY_TIMEZONE,
|
CRYPTOGRAPHY_TIMEZONE,
|
||||||
cryptography_decode_name,
|
cryptography_decode_name,
|
||||||
cryptography_get_name,
|
cryptography_get_name,
|
||||||
@@ -455,13 +455,13 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.cryptograp
|
|||||||
cryptography_name_to_oid,
|
cryptography_name_to_oid,
|
||||||
cryptography_oid_to_name,
|
cryptography_oid_to_name,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.crl_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.crl_info import (
|
||||||
get_crl_info,
|
get_crl_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
identify_pem_format,
|
identify_pem_format,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.support import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.support import (
|
||||||
OpenSSLObject,
|
OpenSSLObject,
|
||||||
load_certificate,
|
load_certificate,
|
||||||
load_certificate_issuer_privatekey,
|
load_certificate_issuer_privatekey,
|
||||||
@@ -469,15 +469,15 @@ from ansible_collections.community.crypto.plugins.module_utils.crypto.support im
|
|||||||
parse_ordered_name_field,
|
parse_ordered_name_field,
|
||||||
select_message_digest,
|
select_message_digest,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.cryptography_dep import (
|
from ansible_collections.community.crypto.plugins.module_utils._cryptography_dep import (
|
||||||
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
COLLECTION_MINIMUM_CRYPTOGRAPHY_VERSION,
|
||||||
assert_required_cryptography_version,
|
assert_required_cryptography_version,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.io import write_file
|
from ansible_collections.community.crypto.plugins.module_utils._io import write_file
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.serial import (
|
from ansible_collections.community.crypto.plugins.module_utils._serial import (
|
||||||
parse_serial,
|
parse_serial,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.time import (
|
from ansible_collections.community.crypto.plugins.module_utils._time import (
|
||||||
get_relative_time_option,
|
get_relative_time_option,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -177,13 +177,13 @@ import binascii
|
|||||||
import typing as t
|
import typing as t
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.basic import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.basic import (
|
||||||
OpenSSLObjectError,
|
OpenSSLObjectError,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.module_backends.crl_info import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.module_backends.crl_info import (
|
||||||
get_crl_info,
|
get_crl_info,
|
||||||
)
|
)
|
||||||
from ansible_collections.community.crypto.plugins.module_utils.crypto.pem import (
|
from ansible_collections.community.crypto.plugins.module_utils._crypto.pem import (
|
||||||
identify_pem_format,
|
identify_pem_format,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user