Remove more traces of PyOpenSSL, including from EE dependencies (#874)

* Remove PyOpenSSL backends.

* Remove EOL ansible-core's from EE builds.

* Update Pythons in EEs.

* Remove pyopenssl tests.
This commit is contained in:
Felix Fontein
2025-04-29 09:33:21 +02:00
committed by GitHub
parent 718021b714
commit 266082db72
8 changed files with 29 additions and 172 deletions

View File

@@ -13,11 +13,6 @@
command: "{{ ansible_python.executable }} -c 'import cryptography; print(cryptography.__version__)'"
register: cryptography_version
- name: Register pyOpenSSL version
command: "{{ ansible_python.executable }} -c 'import OpenSSL; print(OpenSSL.__version__)'"
ignore_errors: true
register: pyopenssl_version
- name: Determine output directory
set_fact:
output_path: "{{ 'output-%0x' % ((2**32) | random) }}"

View File

@@ -21,7 +21,7 @@
privatekey_path: "{{ output_path }}/pkcs12-cert.key"
provider: selfsigned
- name: Create PKCS#12 with cryptography backend
- name: Create PKCS#12
community.crypto.openssl_pkcs12:
action: export
path: "{{ output_path }}/pkcs12-1.p12"
@@ -30,17 +30,3 @@
privatekey_path: "{{ output_path }}/pkcs12-cert.key"
certificate_path: "{{ output_path }}/pkcs12-cert.pem"
state: present
select_crypto_backend: cryptography
when: cryptography_version.stdout is ansible.builtin.version('3.0', '>=')
- name: Create PKCS#12 with PyOpenSSL backend
community.crypto.openssl_pkcs12:
action: export
path: "{{ output_path }}/pkcs12-2.p12"
mode: '0644'
friendly_name: foo
privatekey_path: "{{ output_path }}/pkcs12-cert.key"
certificate_path: "{{ output_path }}/pkcs12-cert.pem"
state: present
select_crypto_backend: pyopenssl
when: not (has_no_pyopenssl | default(false))

View File

@@ -225,38 +225,6 @@ TEST_GET_RELATIVE_TIME_OPTION = cartesian_product(
datetime.datetime(2024, 1, 1, 0, 0, 0),
datetime.datetime(2024, 1, 2, 4, 5, 0, tzinfo=UTC),
),
(
"+1d2h3m4s",
"foo",
"pyopenssl",
False,
datetime.datetime(2024, 1, 1, 0, 0, 0),
"20240102020304Z",
),
(
"-1w10d24h",
"foo",
"pyopenssl",
False,
datetime.datetime(2024, 1, 1, 0, 0, 0),
"20231214000000Z",
),
(
"20240102040506Z",
"foo",
"pyopenssl",
False,
datetime.datetime(2024, 1, 1, 0, 0, 0),
"20240102040506Z",
),
(
"202401020405Z",
"foo",
"pyopenssl",
False,
datetime.datetime(2024, 1, 1, 0, 0, 0),
"202401020405Z",
),
],
)
@@ -333,22 +301,6 @@ if sys.version_info >= (3, 5):
datetime.datetime(2024, 1, 1, 0, 0, 0),
datetime.datetime(2024, 1, 2, 3, 5, 0, tzinfo=UTC),
),
(
"20240102040506+0100",
"foo",
"pyopenssl",
False,
datetime.datetime(2024, 1, 1, 0, 0, 0),
"20240102040506+0100",
),
(
"202401020405+0100",
"foo",
"pyopenssl",
False,
datetime.datetime(2024, 1, 1, 0, 0, 0),
"202401020405+0100",
),
],
)
)