mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-23 01:55:10 +00:00
moved samples under asset-transfer-basic
Signed-off-by: sapthasurendran <saptha.surendran@ibm.com>
This commit is contained in:
parent
f3949f316c
commit
f5322c8b0b
12 changed files with 21 additions and 5 deletions
|
|
@ -101,14 +101,14 @@ generate a certificate on the file system for use by the sample. The private key
|
|||
For HSM support you need to ensure you include the `pkcs11` build tag.
|
||||
|
||||
```
|
||||
cd hsm-samples-gateway/go
|
||||
cd application-gateway-hsm/go
|
||||
go run -tags pkcs11 hsm-sample.go
|
||||
```
|
||||
|
||||
### Node SDK
|
||||
|
||||
```
|
||||
cd hsm-samples-gateway/node
|
||||
cd application-gateway-hsm/node
|
||||
npm install
|
||||
npm run build
|
||||
npm start
|
||||
|
|
@ -33,7 +33,7 @@ import (
|
|||
const (
|
||||
mspID = "Org1MSP"
|
||||
certPath = "../crypto-material/hsm/HSMUser/signcerts/cert.pem"
|
||||
tlsCertPath = "../../test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
|
||||
tlsCertPath = "../../../test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
|
||||
peerEndpoint = "localhost:7051"
|
||||
)
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ const utf8Decoder = new TextDecoder();
|
|||
|
||||
const certPath = path.resolve(__dirname, '..', '..', 'crypto-material', 'hsm', user, 'signcerts', 'cert.pem');
|
||||
|
||||
const tlsCertPath = path.resolve('..', '..','test-network','organizations','peerOrganizations', 'org1.example.com', 'peers', 'peer0.org1.example.com', 'tls', 'ca.crt');
|
||||
const tlsCertPath = path.resolve('..', '..', '..', 'test-network','organizations','peerOrganizations', 'org1.example.com', 'peers', 'peer0.org1.example.com', 'tls', 'ca.crt');
|
||||
const peerEndpoint = 'localhost:7051';
|
||||
|
||||
async function main() {
|
||||
|
|
@ -4,7 +4,7 @@ set -eo pipefail
|
|||
# define the CA setup
|
||||
CA_HOST=localhost
|
||||
CA_URL=${CA_HOST}:7054
|
||||
TLS_CERT='../../test-network/organizations/fabric-ca/org1/tls-cert.pem'
|
||||
TLS_CERT='../../../test-network/organizations/fabric-ca/org1/tls-cert.pem'
|
||||
|
||||
# try to locate the Soft HSM library
|
||||
POSSIBLE_LIB_LOC=('/usr/lib/softhsm/libsofthsm2.so' \
|
||||
|
|
@ -103,6 +103,22 @@ node dist/app.js
|
|||
popd
|
||||
stopNetwork
|
||||
|
||||
# Run typescript HSM gateway application
|
||||
createNetwork
|
||||
print "Initializing Typescript HSM gateway application"
|
||||
pushd ../asset-transfer-basic/application-typescript-hsm
|
||||
print "Setup SoftHSM"
|
||||
export SOFTHSM2_CONF=$PWD/softhsm2.conf
|
||||
softhsm2-util --init-token --slot 0 --label "ForFabric" --pin 98765432 --so-pin 1234
|
||||
print "install dependencies"
|
||||
npm install
|
||||
print "Building app.ts"
|
||||
npm run build
|
||||
print "Running the output app"
|
||||
node dist/app.js
|
||||
popd
|
||||
stopNetwork
|
||||
|
||||
# Run Go gateway application
|
||||
createNetwork
|
||||
print "Initializing Go gateway application"
|
||||
|
|
|
|||
Loading…
Reference in a new issue