Skip to content

Commit 5c8b002

Browse files
committed
test: use post quantum crypto for certs where available
Test post quantum crypto by using certs generated by openssl where available. Signed-off-by: Rich Megginson <rmeggins@redhat.com>
1 parent 315bbf6 commit 5c8b002

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/tasks/fixture_psks.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@
2323
ternary('ansible.posix.rhel_rpm_ostree', omit) }}"
2424
when: "'openssl' not in ansible_facts.packages"
2525

26+
- name: Get openssl algorithms
27+
command: openssl list -public-key-algorithms
28+
register: openssl_algorithms
29+
changed_when: false
30+
no_log: true # this is quite verbose
31+
2632
- name: Generate a self signed pcsd cert and the pcsd key
2733
command: >-
28-
openssl req -x509 -newkey rsa:2048 -nodes
34+
openssl req -x509 -newkey {{ key_algo }} -nodes
2935
-keyout "{{ __test_pcsd_private_key_path }}"
3036
-out "{{ __test_pcsd_public_key_path }}"
3137
-subj "/CN={{ ansible_host }}"
3238
changed_when: false
39+
vars:
40+
key_algo: "{{ 'mldsa65' if 'MLDSA65' in openssl_algorithms.stdout
41+
else 'rsa:2048' }}"
3342

3443
- name: Generate corosync key
3544
copy:

0 commit comments

Comments
 (0)