Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openssl_pkcs12: Add a check for parsed pkcs12 files #145

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bugfixes:
- openssl_pkcs12 - Add a check for parsed PKCS#12 files to prevent permanent
changed state in check mode (https://github.com/ansible-collections/community.crypto/issues/143).
- openssl_pkcs12 - report the correct state when ``action`` is ``parse`` (https://github.com/ansible-collections/community.crypto/issues/143).
8 changes: 8 additions & 0 deletions tests/integration/targets/openssl_pkcs12/tasks/impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
path: '{{ output_dir }}/ansible_parse.pem'
action: parse
state: present
register: p12_dumped
- name: Dump PKCS#12 file again, idempotency
openssl_pkcs12:
src: '{{ output_dir }}/ansible.p12'
path: '{{ output_dir }}/ansible_parse.pem'
action: parse
state: present
register: p12_dumped_idempotency
Normo marked this conversation as resolved.
Show resolved Hide resolved
- name: Generate PKCS#12 file with multiple certs
openssl_pkcs12:
path: '{{ output_dir }}/ansible_multi_certs.p12'
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/openssl_pkcs12/tests/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
- p12_validate_no_pkey.stdout_lines[-1] == '-----END CERTIFICATE-----'
- p12_force.changed
- p12_force_and_mode.mode == '0644' and p12_force_and_mode.changed
- p12_dumped.changed
- not p12_standard_idempotency.changed
- not p12_multiple_certs_idempotency.changed
- not p12_dumped_idempotency.changed
- "'www.' in p12_validate_multi_certs.stdout"
- "'www2.' in p12_validate_multi_certs.stdout"
- "'www3.' in p12_validate_multi_certs.stdout"
Expand Down