Skip to content

Commit 7bb0c52

Browse files
committed
Removing fabric/core/crypto/crypto.go
This change-set finishes the cleanup of the interfaces in crypto.go. All the references have been removed. Change-Id: I5f30fc9f6adf3390a6951ccbcdfbf54edce0e379 Signed-off-by: Angelo De Caro <[email protected]>
1 parent 71805c9 commit 7bb0c52

File tree

6 files changed

+0
-1979
lines changed

6 files changed

+0
-1979
lines changed

core/crypto/crypto.go

-61
This file was deleted.

core/peer/peer.go

-38
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
package peer
1818

1919
import (
20-
"fmt"
2120
"net"
2221

2322
"google.golang.org/grpc"
@@ -26,7 +25,6 @@ import (
2625
"github.com/spf13/viper"
2726

2827
"github.com/hyperledger/fabric/core/comm"
29-
"github.com/hyperledger/fabric/core/crypto"
3028
pb "github.com/hyperledger/fabric/protos/peer"
3129
)
3230

@@ -66,39 +64,3 @@ func NewPeerClientConnectionWithAddress(peerAddress string) (*grpc.ClientConn, e
6664
}
6765
return comm.NewClientConnectionWithAddress(peerAddress, true, false, nil)
6866
}
69-
70-
// Impl implements peer
71-
type Impl struct {
72-
secHelper crypto.Peer
73-
}
74-
75-
// NewPeer returns a Peer implementation
76-
func NewPeer(secHelperFunc func() crypto.Peer) (*Impl, error) {
77-
peer := new(Impl)
78-
79-
peer.secHelper = secHelperFunc()
80-
81-
// Install security object for peer
82-
if SecurityEnabled() {
83-
if peer.secHelper == nil {
84-
return nil, fmt.Errorf("Security helper not provided")
85-
}
86-
}
87-
88-
return peer, nil
89-
}
90-
91-
// GetPeerEndpoint returns the endpoint for this peer
92-
func (p *Impl) GetPeerEndpoint() (*pb.PeerEndpoint, error) {
93-
ep, err := GetPeerEndpoint()
94-
if err == nil && SecurityEnabled() {
95-
// Set the PkiID on the PeerEndpoint if security is enabled
96-
ep.PkiID = p.GetSecHelper().GetID()
97-
}
98-
return ep, err
99-
}
100-
101-
// GetSecHelper returns the crypto.Peer
102-
func (p *Impl) GetSecHelper() crypto.Peer {
103-
return p.secHelper
104-
}

0 commit comments

Comments
 (0)