mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-03-26 21:33:25 +00:00
* 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.
27 lines
801 B
Python
27 lines
801 B
Python
# Copyright (c) 2016, Yanis Guenane <yanis+ansible@guenane.org>
|
|
# Copyright (c) 2020, Felix Fontein <felix@fontein.de>
|
|
# 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
|
|
|
|
# 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
|
|
|
|
|
|
try:
|
|
import cryptography # noqa: F401, pylint: disable=unused-import
|
|
|
|
HAS_CRYPTOGRAPHY = True
|
|
except ImportError:
|
|
# Error handled in the calling module.
|
|
HAS_CRYPTOGRAPHY = False
|
|
|
|
|
|
class OpenSSLObjectError(Exception):
|
|
pass
|
|
|
|
|
|
class OpenSSLBadPassphraseError(OpenSSLObjectError):
|
|
pass
|