mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
openssl_* modules: private key errors (#54088)
* Improve error handling, in particular with respect to private key loading problems. * Add tests to validate that modules regenerate invalid input and don't crash. * Don't crash when input is invalid. * Create 'better' broken input. * Fix paths. * Simplifying pyOpenSSL error handling.
This commit is contained in:
committed by
René Moser
parent
627c5e7f50
commit
90c067e947
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- block:
|
||||
# This module generates unsafe parameters for testing purposes
|
||||
# otherwise tests would be too slow
|
||||
@@ -41,4 +42,15 @@
|
||||
force: yes
|
||||
register: dhparam_changed_force
|
||||
|
||||
- name: Create broken params
|
||||
copy:
|
||||
dest: "{{ output_dir }}/dhbroken.pem"
|
||||
content: "broken"
|
||||
- name: Regenerate broken params
|
||||
openssl_dhparam:
|
||||
path: '{{ output_dir }}/dhbroken.pem'
|
||||
size: 512
|
||||
force: yes
|
||||
register: output_broken
|
||||
|
||||
- import_tasks: ../tests/validate.yml
|
||||
|
||||
@@ -30,3 +30,8 @@
|
||||
- dhparam_changed_512 is not changed
|
||||
- dhparam_changed_to_512 is changed
|
||||
- dhparam_changed_force is changed
|
||||
|
||||
- name: Verify that broken params will be regenerated
|
||||
assert:
|
||||
that:
|
||||
- output_broken is changed
|
||||
|
||||
Reference in New Issue
Block a user