Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Expand Up @@ -3,17 +3,17 @@
# strategy = configure
# complexity = low
# disruption = low
- name: Check existence of pkcs11-switch
stat:
path: /usr/bin/pkcs11-switch
register: pkcs11switch
- name: "{{{ rule_title }}} - Check Existence of pkcs11-switch"
ansible.builtin.stat:
path: /usr/bin/pkcs11-switch
register: pkcs11switch

- name: Get NSS database smart card configuration
command: /usr/bin/pkcs11-switch
- name: "{{{ rule_title }}} - Get NSS Database Smart Card Configuration"
ansible.builtin.command: /usr/bin/pkcs11-switch
changed_when: True
register: pkcsw_output
when: pkcs11switch.stat.exists

- name: "{{{ rule_title }}}"
command: /usr/bin/pkcs11-switch opensc
- name: "{{{ rule_title }}} - Select opensc Module"
ansible.builtin.shell: echo -e "\n" | /usr/bin/pkcs11-switch opensc
when: pkcs11switch.stat.exists and pkcsw_output.stdout != "opensc"
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
PKCSSW=$(/usr/bin/pkcs11-switch)

if [ ${PKCSSW} != "opensc" ] ; then
${PKCSSW} opensc
echo -e "\n" | ${PKCSSW} opensc
fi

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ ocil: |-
run the following command:
<pre>$ pkcs11-switch</pre>
The output should return <pre>opensc</pre>

warnings:
- general: |-
NSS modules information are stored in NSS database which is in binary format. Currently
it is not possible to check NSS database using OVAL. This is the reason there is no OVAL
check for this rule.