mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
65d7f0d17b
* Add certificate_info module. * Improve normalization. * Add extension dump. * Add support for basic_constraints and ocsp_must_staple. * Update docs. * Add serial number. * Remove superfluous code. * Fix formulation. * Improve examples. * Improve result docs. * Forgot to add tests. * Adjust when no fingerprints can be computed.
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
---
|
|
- debug:
|
|
msg: "Executing tests with backend {{ select_crypto_backend }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_1.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
register: result
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_2.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
valid_at:
|
|
today: "+0d"
|
|
past: "20190101235901Z"
|
|
twentydays: "+20d"
|
|
register: result
|
|
- assert:
|
|
that:
|
|
- result.valid_at.today
|
|
- not result.valid_at.past
|
|
- not result.valid_at.twentydays
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_3.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
register: result
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|
|
|
|
- name: ({{select_crypto_backend}}) Get certificate info
|
|
openssl_certificate_info:
|
|
path: '{{ output_dir }}/cert_4.pem'
|
|
select_crypto_backend: '{{ select_crypto_backend }}'
|
|
register: result
|
|
|
|
- name: Update result list
|
|
set_fact:
|
|
info_results: "{{ info_results + [result] }}"
|