diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2018-08-06 17:38:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-08-06 17:38:45 +0000 |
commit | 0aac0026726488762e58ca41d2b4a7918488a274 (patch) | |
tree | c05720af3656f90f7081f6ace684e512c415c63c /bin/distcenter/entrypoint.sh | |
parent | c5bc5aae60f1bd4e0c0ed61d909cd41cdc20abe2 (diff) | |
parent | 4c48eea00420dff7a46104c0cf0b9a550362c34b (diff) |
Merge "Changes to encrypt and copy out private key"
Diffstat (limited to 'bin/distcenter/entrypoint.sh')
-rwxr-xr-x | bin/distcenter/entrypoint.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/distcenter/entrypoint.sh b/bin/distcenter/entrypoint.sh index 85cdf52..641c529 100755 --- a/bin/distcenter/entrypoint.sh +++ b/bin/distcenter/entrypoint.sh @@ -2,11 +2,21 @@ set -e cd /createca /createca/create_ca.sh +cd /createca/ca +cat /volume/passphrase | gpg --no-tty --symmetric -z 9 --require-secmem \ + --cipher-algo AES256 --s2k-cipher-algo AES256 --s2k-digest-algo SHA512 \ + --s2k-mode 3 --s2k-count 65000000 --compress-algo BZIP2 \ + --passphrase-fd 0 privkey.pem +cp /createca/ca/privkey.pem.gpg /volume +cp /createca/ca/ca.cert /volume + cd /volume DLIST=`ls -d host_*` for DIR in $DLIST; do echo $DIR cp /createca/ca/ca.cert /volume/$DIR cd /volume/$DIR - /dup/bin/ossl_tpm_duplicate -pemfile /createca/ca/privkey.pem -parentPub /dup/database/$DIR/out_parent_public -dupPub dupPub -dupPriv dupPriv -dupSymSeed dupSymseed -dupEncKey dupEncKey + /dup/bin/ossl_tpm_duplicate -pemfile /createca/ca/privkey.pem -parentPub \ + /volume/$DIR/out_parent_public -dupPub dupPub -dupPriv dupPriv -dupSymSeed \ + dupSymseed -dupEncKey dupEncKey done |