From d198617591320df8e3af66131965237b075ee6b3 Mon Sep 17 00:00:00 2001 From: Yi DENG Date: Thu, 14 Mar 2019 15:59:04 +0800 Subject: [PATCH] bug fix: ssl login. Signed-off-by: Yi DENG --- src/util/fabric.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/fabric.js b/src/util/fabric.js index 8cfb478..e1af61e 100644 --- a/src/util/fabric.js +++ b/src/util/fabric.js @@ -36,7 +36,7 @@ class FabricClient { const self = this; const fabricClient = this.fabricClient; return new Promise((resolve) => { - logger.info('input:', input.result); + logger.info('config:', config); if (config.tlsPeerPath === '' || config.tlsOrdererPath === '') { logger.info('+++++++++++++++++'); @@ -49,9 +49,9 @@ class FabricClient { self.orderersCert = fs.readFileSync(config.tlsOrdererPath); self.flag = true; self.peer = fabricClient.newPeer(config.peerGrpcUrl, - { pem: Buffer.from(this.peerCert).toString(), 'ssl-target-name-override': this.config.peerSSLTarget }); + { pem: Buffer.from(this.peerCert).toString(), 'ssl-target-name-override': config.peerSSLTarget }); self.order = fabricClient.newOrderer(config.ordererUrl, - { pem: Buffer.from(this.orderersCert).toString(), 'ssl-target-name-override': this.config.ordererSSLTarget }); + { pem: Buffer.from(this.orderersCert).toString(), 'ssl-target-name-override': config.ordererSSLTarget }); } logger.info('config:', config);