Skip to content

Commit

Permalink
FABN-1133 NodeSDK switch to caname
Browse files Browse the repository at this point in the history
Use  caname on all fabric-ca outbound calls to line upe
with Fabric-CA use of the name.

Change-Id: If008ecb0a25ebbbfe00ca11d754e338d2fa58581
Signed-off-by: Bret Harrison <beharrison@nc.rr.com>
  • Loading branch information
harrisob committed May 30, 2019
1 parent 22bf23c commit b0ec92c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions fabric-ca-client/lib/FabricCAClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const FabricCAClient = class {
/**
* constructor
*
* @param {object} connect_opts Connection options for communciating with the Fabric CA server
* @param {object} connect_opts Connection options for communicating with the Fabric CA server
* @param {string} connect_opts.protocol The protocol to use (either HTTP or HTTPS)
* @param {string} connect_opts.hostname The hostname of the Fabric CA server endpoint
* @param {number} connect_opts.port The port of the Fabric CA server endpoint
Expand Down Expand Up @@ -275,7 +275,7 @@ const FabricCAClient = class {
}

if (requestObj) {
requestObj.caName = this._caName;
requestObj.caname = this._caName;
}
// establish socket timeout
// default: 3000ms
Expand Down Expand Up @@ -427,7 +427,7 @@ const FabricCAClient = class {
};

const enrollRequest = {
caName: self._caName,
caname: self._caName,
certificate_request: csr
};

Expand Down
8 changes: 4 additions & 4 deletions fabric-client/lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1485,9 +1485,9 @@ const Client = class extends BaseClient {
*
* @typedef {Object} UserNamePasswordObject
* @property {string} username - Required. A string representing the user name of the user
* @property {string} password - Optional. A string repsesenting the password of the user
* @property {string} caName - Optional. A string repsesenting the name of the Certificate Authority.
If not specified, will use the first Certifcate Authority on the list.
* @property {string} password - Optional. A string representing the password of the user
* @property {string} caName - Optional. A string representing the name of the Certificate Authority.
If not specified, will use the first Certificate Authority on the list.
*/

/**
Expand Down Expand Up @@ -1573,7 +1573,7 @@ const Client = class extends BaseClient {
}

// this could be because the application has not set a user context yet for this client, which would
// be an error condiditon, or it could be that this app has crashed before and is recovering, so we
// be an error condition, or it could be that this app has crashed before and is recovering, so we
// should allow the previously saved user context object to be deserialized

// first check if there is a user context of the specified name in persistence
Expand Down

0 comments on commit b0ec92c

Please sign in to comment.