345011e024
* Revert "Revert "openssl_csr: Allow to use cryptography as backend (#50324)""
This reverts commit bbd2e31e9f
.
* Remove more complicated selection copy'n'pasted from openssl_privatekey.
* Add tests for backend selection.
* Add openssl_csr test for arbitrary string commonName.
* Allow to disable commonName -> SAN copying (fixes #36690).
40 lines
1 KiB
YAML
40 lines
1 KiB
YAML
---
|
|
- name: Prepare private key for backend autodetection test
|
|
openssl_privatekey:
|
|
path: '{{ output_dir }}/privatekey_backend_selection.pem'
|
|
- name: Run module with backend autodetection
|
|
openssl_csr:
|
|
path: '{{ output_dir }}/csr_backend_selection.csr'
|
|
privatekey_path: '{{ output_dir }}/privatekey_backend_selection.pem'
|
|
subject:
|
|
commonName: www.ansible.com
|
|
|
|
- block:
|
|
- name: Running tests with pyOpenSSL backend
|
|
include_tasks: impl.yml
|
|
vars:
|
|
select_crypto_backend: pyopenssl
|
|
|
|
- import_tasks: ../tests/validate.yml
|
|
|
|
when: pyopenssl_version.stdout is version('0.15', '>=')
|
|
|
|
- name: Remove output directory
|
|
file:
|
|
path: "{{ output_dir }}"
|
|
state: absent
|
|
|
|
- name: Re-create output directory
|
|
file:
|
|
path: "{{ output_dir }}"
|
|
state: directory
|
|
|
|
- block:
|
|
- name: Running tests with cryptography backend
|
|
include_tasks: impl.yml
|
|
vars:
|
|
select_crypto_backend: cryptography
|
|
|
|
- import_tasks: ../tests/validate.yml
|
|
|
|
when: cryptography_version.stdout is version('1.3', '>=')
|