github.com/pvitto98/fabric@v2.1.1+incompatible/vagrant/user.sh (about) 1 #!/bin/bash -eu 2 # 3 # Copyright IBM Corp. All Rights Reserved. 4 # 5 # SPDX-License-Identifier: Apache-2.0 6 7 # ---------------------------------------------------------------- 8 # Generate pkcs11 token for fabric tests 9 # ---------------------------------------------------------------- 10 softhsm2-util --init-token --slot 0 --label "ForFabric" --so-pin 1234 --pin 98765432 11 12 cat <<EOF >>/home/vagrant/.bashrc 13 14 export PKCS11_LIB="$(find /usr/lib -name libsofthsm2.so)" 15 export PKCS11_PIN=98765432 16 export PKCS11_LABEL="ForFabric" 17 EOF 18 19 cat <<EOF >>/home/vagrant/.bashrc 20 21 export GOPATH=\$HOME/go 22 export PATH=\$PATH:\$HOME/go/bin 23 cd \$GOPATH/src/github.com/hyperledger/fabric/ 24 EOF