Skip to content

Commit

Permalink
Merge pull request #203 from vakwetu/fix_script
Browse files Browse the repository at this point in the history
Fix generate_pkcs11_keys.sh to handle quotes
  • Loading branch information
openshift-merge-bot[bot] authored Feb 7, 2025
2 parents eaee1fd + aa26542 commit 9bd1b44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/barbican/bin/generate_pkcs11_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ set -xe

{{- if and (index . "PKCS11Enabled") .PKCS11Enabled }}

mkek_label=$(crudini --get /etc/barbican/barbican.conf.d/01-custom.conf p11_crypto_plugin mkek_label)
eval mkek_label=$(crudini --get /etc/barbican/barbican.conf.d/01-custom.conf p11_crypto_plugin mkek_label)
echo "Creating MKEK label $mkek_label"
barbican-manage hsm check_mkek --label $mkek_label || barbican-manage hsm gen_mkek --label $mkek_label

hmac_label=$(crudini --get /etc/barbican/barbican.conf.d/01-custom.conf p11_crypto_plugin hmac_label)
eval hmac_label=$(crudini --get /etc/barbican/barbican.conf.d/01-custom.conf p11_crypto_plugin hmac_label)
echo "Creating HMAC label $hmac_label"
barbican-manage hsm check_hmac --label $hmac_label || barbican-manage hsm gen_hmac --label $hmac_label
{{- end }}

0 comments on commit 9bd1b44

Please sign in to comment.