diff --git a/manifests/dltservice.yaml b/manifests/dltservice.yaml index a6b04b4d8232b7193ff0d7d839ae5199e9fa0cec..6602a45f562e5e4724637853f7a22ced84287dce 100644 --- a/manifests/dltservice.yaml +++ b/manifests/dltservice.yaml @@ -23,8 +23,8 @@ data: PEER_ENDPOINT: "10.1.1.96:7051" #Change to required peer# PEER_HOST_ALIAS: "peer0.org1.adrenaline.com" CRYPTO_PATH: "/test-network/organizations/peerOrganizations/org1.adrenaline.com" - KEY_DIRECTORY_PATH: "/etc/hyperledger/fabric-keystore/" - CERT_DIRECTORY_PATH: "/etc/hyperledger/fabric-signcerts/" + KEY_DIRECTORY_PATH: "/etc/hyperledger/fabric-keystore/keystore" + CERT_DIRECTORY_PATH: "/etc/hyperledger/fabric-signcerts/signcerts.pem" TLS_CERT_PATH: "/etc/hyperledger/fabric-ca-crt/ca.crt" --- @@ -128,9 +128,9 @@ spec: name: dlt-config key: CRYPTO_PATH - name: KEY_DIRECTORY_PATH - value: "/etc/hyperledger/fabric-keystore/" + value: "/etc/hyperledger/fabric-keystore/keystore" - name: CERT_DIRECTORY_PATH - value: "/etc/hyperledger/fabric-signcerts/" + value: "/etc/hyperledger/fabric-signcerts/signcerts.pem" - name: TLS_CERT_PATH value: "/etc/hyperledger/fabric-ca-crt/ca.crt" volumes: diff --git a/src/dlt/gateway/dltApp/src/fabricConnect.ts b/src/dlt/gateway/dltApp/src/fabricConnect.ts index ae61ef2ff293ee2d19550af8de0b85cb7eb48d33..cab9559586a50aa14a8a4ddebcf25dfcfe46a171 100644 --- a/src/dlt/gateway/dltApp/src/fabricConnect.ts +++ b/src/dlt/gateway/dltApp/src/fabricConnect.ts @@ -104,23 +104,23 @@ async function newGrpcConnection(): Promise<grpc.Client> { } async function newIdentity(): Promise<Identity> { - const certPath = await getFirstDirFileName(certDirectoryPath); - console.log("DEBUG", certPath); - const credentials = await fs.readFile(certPath); + //const certPath = await getFirstDirFileName(certDirectoryPath); + console.log("DEBUG", certDirectoryPath); + const credentials = await fs.readFile(certDirectoryPath); return { mspId, credentials }; } -async function getFirstDirFileName(dirPath: string): Promise<string> { - const files = await fs.readdir(dirPath); - const filePath = path.join(dirPath, files[0]); - const realFilePath = await fs.readlink(filePath); - return path.join(dirPath, realFilePath); -} +//async function getFirstDirFileName(dirPath: string): Promise<string> { + // const files = await fs.readdir(dirPath); + // const filePath = path.join(dirPath, files[0]); + // const realFilePath = await fs.readlink(filePath); + // return path.join(dirPath, realFilePath); +//} async function newSigner(): Promise<Signer> { - const keyPath = await getFirstDirFileName(keyDirectoryPath); - console.log("DEBUG2", keyPath); - const privateKeyPem = await fs.readFile(keyPath); + //const keyPath = await getFirstDirFileName(keyDirectoryPath); + console.log("DEBUG2", keyDirectoryPath); + const privateKeyPem = await fs.readFile(keyDirectoryPath); const privateKey = crypto.createPrivateKey(privateKeyPem); return signers.newPrivateKeySigner(privateKey); }