You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2025. It is now read-only.
Since the signingIdentity is undefined (because the method fabricCAClient.enroll set it) the Authorization header is not set,rejectUnauthorized is set to true because verify: true when I instantiated the class, therefore, I get the following error:
I'm asking because I coded a script to create Identities and it was working until today, the latest change in my repository was the upgrade of the SDK from 2.2.9 to 2.2.11 but TBH I cannot blame the upgrade, I reviewed the code and it seems that nothing has changed in that logic for a long time.
So the question I have is: In the fabricCAClient.request method when
signingIdentity is undefined
AND this._tlsOptions.verify is true
AND the property certificate_request exists in requestObj
How the Authorization is header is set? Or Why the certificate_request is not used if the signingIdentity is undefined?
I'm not an expert in SSL/TLS certificates and cannot not propose a fix (I tried a couple of stuff but none worked), I just want to understand if it is an edge case o something is missing in the logic. For the moment the quick fix for this is it to instantiate FabricCaServices w/o verify.
This discussion was converted from issue #542 on January 13, 2023 22:20.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm just writing to get some clarification about how
requestObj.certificate_requestis used here https://github.com/hyperledger/fabric-sdk-node/blob/v2.2.11/fabric-ca-client/lib/FabricCAClient.js#L236I'm using the class
FabricCAServicesand instantiating the class using the following piece of codeThen I use the method
fabricCAServices.enrollpassing an object that has the propertycsr. So, the methodfabricCAServices.enrollpasses thecsrtofabricCAClient.enroll(here you can see it https://github.com/hyperledger/fabric-sdk-node/blob/v2.2.11/fabric-ca-client/lib/FabricCAServices.js#L219) then the method puts it in an objectAnd finally it sends
enrollRequestobject to therequestmethod without asigningIdentity(here you can see the method https://github.com/hyperledger/fabric-sdk-node/blob/v2.2.11/fabric-ca-client/lib/FabricCAClient.js#L236).Since the
signingIdentityisundefined(because the methodfabricCAClient.enrollset it) the Authorization header is not set,rejectUnauthorizedis set totruebecauseverify: truewhen I instantiated the class, therefore, I get the following error:I'm asking because I coded a script to create Identities and it was working until today, the latest change in my repository was the upgrade of the SDK from
2.2.9to2.2.11but TBH I cannot blame the upgrade, I reviewed the code and it seems that nothing has changed in that logic for a long time.So the question I have is: In the
fabricCAClient.requestmethod whensigningIdentityisundefinedthis._tlsOptions.verifyistruecertificate_requestexists inrequestObjHow the Authorization is header is set? Or Why the
certificate_requestis not used if thesigningIdentityisundefined?I'm not an expert in SSL/TLS certificates and cannot not propose a fix (I tried a couple of stuff but none worked), I just want to understand if it is an edge case o something is missing in the logic. For the moment the quick fix for this is it to instantiate
FabricCaServicesw/o verify.Thanks in advance,
Beta Was this translation helpful? Give feedback.
All reactions