Skip to content

Commit

Permalink
bug fix: ssl login.
Browse files Browse the repository at this point in the history
Signed-off-by: Yi DENG <[email protected]>
  • Loading branch information
dengyi9 committed Mar 14, 2019
1 parent 6e49f75 commit d198617
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/fabric.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('+++++++++++++++++');
Expand All @@ -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);
Expand Down

0 comments on commit d198617

Please sign in to comment.