Skip to content

Instantly share code, notes, and snippets.

@yuuichi-fujioka
Created January 19, 2016 00:33
Show Gist options
  • Save yuuichi-fujioka/b10a7321d7389ade8f1f to your computer and use it in GitHub Desktop.
Save yuuichi-fujioka/b10a7321d7389ade8f1f to your computer and use it in GitHub Desktop.
barbican certificate container with passphrase
#!/bin/bash
barbican secret store --payload-content-type='text/plain' --name='test_cert' --payload="$(cat test_cert.pem)"
barbican secret store --payload-content-type='text/plain' --name='test_key' --payload="$(cat test_key.pem)"
barbican secret store --payload-content-type='text/plain' --name='test_passphrase' --payload="password"
barbican secret container create --name='tls_container' --type='certificate' --secret="certificate=$(barbican secret list | awk '/ test_cert / {print $2}')" --secret="private_key=$(barbican secret list | awk '/ test_key / {print $2}')" --secret="private_key_passphrase=$(barbican secret list | awk '/ test_passphrase / {print $2}')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment