mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-08 06:13:03 +00:00
* Remove superfluous remote_src. * Use temp dir twice instead of output_dir. * Use remote temp directory instead of output_dir. * Fix syntax error. * Add some fixes. * Copy more files to remote. * More fixes. * Fixing ACME/'cloud' tests. * Forgot when. * Try to fix filters. * Skip unnecessary steps. * Avoid collision.
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
---
|
|
# This file is intended to be included in a loop statement
|
|
- name: Sign statement with {{ item.type }} key - {{ item.passwd }} using {{ item.backend }}
|
|
openssl_signature:
|
|
privatekey_path: '{{ remote_tmp_dir }}/{{item.backend}}_privatekey_{{ item.type }}_{{ item.passwd }}.pem'
|
|
privatekey_passphrase: '{{ item.privatekey_passphrase | default(omit) }}'
|
|
path: '{{ remote_tmp_dir }}/statement.txt'
|
|
select_crypto_backend: '{{ item.backend }}'
|
|
register: sign_result
|
|
|
|
- debug:
|
|
var: sign_result
|
|
|
|
- name: Verify {{ item.type }} signature - {{ item.passwd }} using {{ item.backend }}
|
|
openssl_signature_info:
|
|
certificate_path: '{{ remote_tmp_dir }}/{{item.backend}}_certificate_{{ item.type }}_{{ item.passwd }}.pem'
|
|
path: '{{ remote_tmp_dir }}/statement.txt'
|
|
signature: '{{ sign_result.signature }}'
|
|
select_crypto_backend: '{{ item.backend }}'
|
|
register: verify_result
|
|
|
|
- name: Make sure the signature is valid
|
|
assert:
|
|
that:
|
|
- verify_result.valid
|
|
|
|
- debug:
|
|
var: verify_result
|