2018-01-26 09:08:29 +01:00
|
|
|
---
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Validate generated params"
|
2018-01-26 09:08:29 +01:00
|
|
|
shell: 'openssl dhparam -in {{ output_dir }}/{{ item }}.pem -noout -check'
|
|
|
|
with_items:
|
|
|
|
- dh768
|
|
|
|
- dh512
|
|
|
|
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Get bit size of 768"
|
2018-01-26 09:08:29 +01:00
|
|
|
shell: 'openssl dhparam -noout -in {{ output_dir }}/dh768.pem -text | head -n1 | sed -ne "s@.*(\\([[:digit:]]\{1,\}\\) bit).*@\\1@p"'
|
|
|
|
register: bit_size_dhparam
|
|
|
|
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Check bit size of default"
|
2018-01-26 09:08:29 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- bit_size_dhparam.stdout == "768"
|
|
|
|
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Get bit size of 512"
|
2018-01-26 09:08:29 +01:00
|
|
|
shell: 'openssl dhparam -noout -in {{ output_dir }}/dh512.pem -text | head -n1 | sed -ne "s@.*(\\([[:digit:]]\{1,\}\\) bit).*@\\1@p"'
|
|
|
|
register: bit_size_dhparam_512
|
|
|
|
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Check bit size of default"
|
2018-01-26 09:08:29 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- bit_size_dhparam_512.stdout == "512"
|
|
|
|
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Check if changed works correctly"
|
2018-01-26 09:08:29 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- dhparam_changed is not changed
|
|
|
|
- dhparam_changed_512 is not changed
|
|
|
|
- dhparam_changed_to_512 is changed
|
|
|
|
- dhparam_changed_force is changed
|
2019-03-30 14:28:10 +01:00
|
|
|
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Verify that broken params will be regenerated"
|
2019-03-30 14:28:10 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- output_broken is changed
|
2019-03-30 15:38:43 +01:00
|
|
|
|
2019-10-04 21:53:04 +02:00
|
|
|
- name: "[{{ select_crypto_backend }}] Check backup"
|
2019-03-30 15:38:43 +01:00
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- dhparam_backup_1 is changed
|
|
|
|
- dhparam_backup_1.backup_file is undefined
|
|
|
|
- dhparam_backup_2 is not changed
|
|
|
|
- dhparam_backup_2.backup_file is undefined
|
|
|
|
- dhparam_backup_3 is changed
|
|
|
|
- dhparam_backup_3.backup_file is string
|
|
|
|
- dhparam_backup_4 is changed
|
|
|
|
- dhparam_backup_4.backup_file is string
|
|
|
|
- dhparam_backup_5 is not changed
|
|
|
|
- dhparam_backup_5.backup_file is undefined
|