community.crypto.crypto_info (2.18.0) — module

Retrieve cryptographic capabilities

| "added in version" 2.1.0 of community.crypto"

Authors: Felix Fontein (@felixfontein)

Install collection

Install with ansible-galaxy collection install community.crypto:==2.18.0


Add to requirements.yml

  collections:
    - name: community.crypto
      version: 2.18.0

Description

Retrieve information on cryptographic capabilities.

The current version retrieves information on the L(Python cryptography library, https://cryptography.io/) available to Ansible modules, and on the OpenSSL binary C(openssl) found in the path.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Retrieve information
  community.crypto.crypto_info:
    account_key_src: /etc/pki/cert/private/account.key
  register: crypto_information
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show retrieved information
  ansible.builtin.debug:
    var: crypto_information

Outputs

openssl:
  contains:
    path:
      description: Path of the OpenSSL binary.
      sample: /usr/bin/openssl
      type: str
    version:
      description: The OpenSSL version.
      sample: 1.1.1m
      type: str
    version_output:
      description: The complete output of C(openssl version).
      sample: OpenSSL 1.1.1m  14 Dec 2021\n
      type: str
  description: Information on the installed OpenSSL binary.
  returned: when RV(openssl_present=true)
  type: dict
openssl_present:
  description: Whether the OpenSSL binary C(openssl) is installed and can be found
    in the PATH.
  returned: always
  sample: true
  type: bool
python_cryptography_capabilities:
  contains:
    curves:
      description:
      - List of all supported elliptic curves.
      - Theoretically this should be non-empty for version 0.5 and higher, depending
        on the libssl version used.
      elements: str
      type: list
    has_dsa:
      description:
      - Whether DSA keys are supported.
      - Theoretically this should be the case for version 0.5 and higher.
      type: bool
    has_dsa_sign:
      description:
      - Whether signing with DSA keys is supported.
      - Theoretically this should be the case for version 1.5 and higher.
      type: bool
    has_ec:
      description:
      - Whether elliptic curves are supported.
      - Theoretically this should be the case for version 0.5 and higher, depending
        on the libssl version used.
      type: bool
    has_ec_sign:
      description:
      - Whether signing with elliptic curves is supported.
      - Theoretically this should be the case for version 1.5 and higher, depending
        on the libssl version used.
      type: bool
    has_ed25519:
      description:
      - Whether Ed25519 keys are supported.
      - Theoretically this should be the case for version 2.6 and higher, depending
        on the libssl version used.
      type: bool
    has_ed25519_sign:
      description:
      - Whether signing with Ed25519 keys is supported.
      - Theoretically this should be the case for version 2.6 and higher, depending
        on the libssl version used.
      type: bool
    has_ed448:
      description:
      - Whether Ed448 keys are supported.
      - Theoretically this should be the case for version 2.6 and higher, depending
        on the libssl version used.
      type: bool
    has_ed448_sign:
      description:
      - Whether signing with Ed448 keys is supported.
      - Theoretically this should be the case for version 2.6 and higher, depending
        on the libssl version used.
      type: bool
    has_rsa:
      description:
      - Whether RSA keys are supported.
      - Theoretically this should be the case for version 0.5 and higher.
      type: bool
    has_rsa_sign:
      description:
      - Whether signing with RSA keys is supported.
      - Theoretically this should be the case for version 1.4 and higher.
      type: bool
    has_x25519:
      description:
      - Whether X25519 keys are supported.
      - Theoretically this should be the case for version 2.0 and higher, depending
        on the libssl version used.
      type: bool
    has_x25519_serialization:
      description:
      - Whether serialization of X25519 keys is supported.
      - Theoretically this should be the case for version 2.5 and higher, depending
        on the libssl version used.
      type: bool
    has_x448:
      description:
      - Whether X448 keys are supported.
      - Theoretically this should be the case for version 2.5 and higher, depending
        on the libssl version used.
      type: bool
    version:
      description: The library version.
      type: str
  description: Information on the installed L(Python cryptography library, https://cryptography.io/).
  returned: when RV(python_cryptography_installed=true)
  type: dict
python_cryptography_import_error:
  description: Import error when trying to import the L(Python cryptography library,
    https://cryptography.io/).
  returned: when RV(python_cryptography_installed=false)
  type: str
python_cryptography_installed:
  description: Whether the L(Python cryptography library, https://cryptography.io/)
    is installed.
  returned: always
  sample: true
  type: bool