github.com/Hnampk/my-fabric@v0.0.0-20201028083322-75069da399c0/ci/scripts/setup_hsm.sh (about)

     1  #!/bin/bash
     2  # Copyright the Hyperledger Fabric contributors. All rights reserved.
     3  #
     4  # SPDX-License-Identifier: Apache-2.0
     5  set -euo pipefail
     6  
     7  sudo apt-get install -y softhsm2
     8  sudo mkdir -p /var/lib/softhsm/tokens
     9  sudo softhsm2-util --init-token --slot 0 --label "ForFabric" --so-pin 1234 --pin 98765432
    10  sudo chmod -R 777 /var/lib/softhsm
    11  mkdir -p ~/.config/softhsm2
    12  cp /usr/share/softhsm/softhsm2.conf ~/.config/softhsm2