diff --git a/tests/playbook.yml b/tests/playbook.yml index 00745b7e91fe9de184490b6ca4f8a365323e0334..7a44200ec589513f882422b652f239b4e07f7a93 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -5,3 +5,13 @@ - hosts: all roles: [ ca-store ] + post_tasks: + - name: Get DH params bit count + dhparams: + path: /etc/ssl/dhparams.pem + register: ca_store_test_dhparams + + - name: Verify high bit count DH params + assert: + that: + - ca_store_test_dhparams.bits >= 2048 diff --git a/tests/test_ca_store.py b/tests/test_ca_store.py index d2929b5adde06063dedaeb93aba3cc14d2909b60..f8d6ad5ba887d48c3df47366a3a99ce6976bab83 100644 --- a/tests/test_ca_store.py +++ b/tests/test_ca_store.py @@ -49,12 +49,6 @@ def test_update_ca_certificates(File, Ansible, Command, Sudo, assert Command(filename).rc == 0 -def test_dh_params(File, Ansible): - assert File('/etc/ssl/dhparams.pem').is_file - assert int(Ansible('dhparams', 'path=/etc/ssl/dhparams.pem')[ - "bits"]) >= 2048 - - def test_snakeoil_cert(File): assert File('/etc/ssl/certs/ssl-cert-snakeoil.pem').is_file