SignedProposal Has No Signature? #357
-
I noticed that none of the implementations utilize the signature field in the SignedProposals in the proposal_builder (for example - https://github.com/hyperledger/fabric-gateway/blob/main/pkg/client/proposalbuilder.go#L42). Could anyone explain the reasoning for this? Without that, can't any parameter be changed in the proposal and be accepted as valid? I don't see any other place where the content is being signed or hashed. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It dawned on me - it isn't automatically signed to support offline signing. I now see there is a |
Beta Was this translation helpful? Give feedback.
-
The proposal is always signed just before it is sent using the signer specified when connecting the Gateway, unless it has already been signed using the off-line signing flow:
The off-line signing flow sets the supplied signature, which makes the signing during the endorse and evaluate a no-op since the signature is already present:
The reason a signature isn’t created when the proposal is created is that, if you are exclusively using off-line signing, you can connect the Gateway without a signer. In this case, creating the signature using the Gateway’s signer when the proposal is created would fail. |
Beta Was this translation helpful? Give feedback.
The proposal is always signed just before it is sent using the signer specified when connecting the Gateway, unless it has already been signed using the off-line signing flow:
fabric-gateway/pkg/client/proposal.go
Line 64 in 1e4a926
fabric-gateway/pkg/client/proposal.go
Line 104 in 1e4a926
The off-line signing flow sets the supplied signature, which makes the signing during the endorse and evaluate a no-op since the signature is already present:
fabric-gateway/pkg/client/gateway.go
Line 194 in 1e4a926
Th…