Skip to content
Merged
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
10 changes: 5 additions & 5 deletions templates/barbican/bin/generate_pkcs11_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -xe
set -e

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

eval mkek_label=$(crudini --get /etc/barbican/barbican.conf.d/01-custom.conf p11_crypto_plugin mkek_label)
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
barbican-manage hsm check_mkek --label "$mkek_label" || barbican-manage hsm gen_mkek --label "$mkek_label"

eval hmac_label=$(crudini --get /etc/barbican/barbican.conf.d/01-custom.conf p11_crypto_plugin hmac_label)
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
barbican-manage hsm check_hmac --label "$hmac_label" || barbican-manage hsm gen_hmac --label "$hmac_label"
{{- end }}
Loading