Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit db394dc

Browse files
committed
[FAB-9410] Import Discovery Client
Change-Id: I9d124ae5c5331dca02c0d5e83bd08583255ed897 Signed-off-by: Bob Stasyszyn <Bob.Stasyszyn@securekey.com>
1 parent 26b9f7c commit db394dc

File tree

4 files changed

+98
-77
lines changed

4 files changed

+98
-77
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ FABRIC_DEV_REGISTRY_PRE_CMD ?= docker login -u docker -p docker nexus3.hyperledg
6666
THIRDPARTY_FABRIC_CA_BRANCH ?= master
6767
THIRDPARTY_FABRIC_CA_COMMIT ?= v1.1.0
6868
THIRDPARTY_FABRIC_BRANCH ?= master
69-
THIRDPARTY_FABRIC_COMMIT ?= 30806c107fe89e29d6c80b6244a57477242f241f
69+
THIRDPARTY_FABRIC_COMMIT ?= 68f268379c78cabbd4325fc2e40059a8c46912ae
7070

7171
# Force removal of images in cleanup (overridable)
7272
FIXTURE_DOCKER_REMOVE_FORCE ?= false
Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
/*
2-
Copyright IBM Corp. 2016 All Rights Reserved.
2+
Copyright IBM Corp. All Rights Reserved.
33
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
4+
SPDX-License-Identifier: Apache-2.0
155
*/
166
/*
177
Notice: This file has been modified for Hyperledger Fabric SDK Go usage.
@@ -20,13 +10,41 @@ Please review third_party pinning scripts and patches for more details.
2010

2111
package crypto
2212

23-
import cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
13+
import (
14+
cb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
15+
)
2416

2517
// LocalSigner is a temporary stub interface which will be implemented by the local MSP
2618
type LocalSigner interface {
19+
SignatureHeaderMaker
20+
Signer
21+
}
22+
23+
// Signer signs messages
24+
type Signer interface {
25+
// Sign a message and return the signature over the digest, or error on failure
26+
Sign(message []byte) ([]byte, error)
27+
}
28+
29+
// IdentitySerializer serializes identities
30+
type IdentitySerializer interface {
31+
// Serialize converts an identity to bytes
32+
Serialize() ([]byte, error)
33+
}
34+
35+
// SignatureHeaderMaker creates a new SignatureHeader
36+
type SignatureHeaderMaker interface {
2737
// NewSignatureHeader creates a SignatureHeader with the correct signing identity and a valid nonce
2838
NewSignatureHeader() (*cb.SignatureHeader, error)
39+
}
2940

30-
// Sign a message which should embed a signature header created by NewSignatureHeader
31-
Sign(message []byte) ([]byte, error)
41+
// SignatureHeaderCreator creates signature headers
42+
type SignatureHeaderCreator struct {
43+
SignerSupport
44+
}
45+
46+
// SignerSupport implements the needed support for LocalSigner
47+
type SignerSupport interface {
48+
Signer
49+
IdentitySerializer
3250
}

internal/github.com/hyperledger/fabric/discovery/client/client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ func (c *client) Send(ctx context.Context, req *Request) (Response, error) {
143143
return nil, errors.Wrap(err, "failed connecting to discovery service")
144144
}
145145

146-
defer conn.Close()
147146
defer func() {
148147
req.Queries = nil
149148
}()

third_party/github.com/hyperledger/fabric/protos/common/common.pb.go

Lines changed: 64 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)