{"record":{"id":"4fe3979442be35d0","repo":"hyperledger/fabric","slug":"core-comm-server-handshakes-are-not-implemented-w","errorCode":null,"errorMessage":"core/comm: server handshakes are not implemented with clientCreds","messagePattern":"core/comm: server handshakes are not implemented with clientCreds","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pkg/comm/creds.go","lineNumber":24,"sourceCode":"\npackage comm\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"crypto/x509\"\n\t\"errors\"\n\t\"net\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/hyperledger/fabric-lib-go/common/flogging\"\n\t\"google.golang.org/grpc/credentials\"\n)\n\nvar (\n\tErrClientHandshakeNotImplemented = errors.New(\"core/comm: client handshakes are not implemented with serverCreds\")\n\tErrServerHandshakeNotImplemented = errors.New(\"core/comm: server handshakes are not implemented with clientCreds\")\n\tErrOverrideHostnameNotSupported  = errors.New(\"core/comm: OverrideServerName is not supported\")\n\n\t// alpnProtoStr are the specified application level protocols for gRPC.\n\talpnProtoStr = []string{\"h2\"}\n\n\t// Logger for TLS client connections\n\ttlsClientLogger = flogging.MustGetLogger(\"comm.tls\")\n)\n\n// NewServerTransportCredentials returns a new initialized\n// grpc/credentials.TransportCredentials\nfunc NewServerTransportCredentials(\n\tserverConfig *TLSConfig,\n\tlogger *flogging.FabricLogger,\n) credentials.TransportCredentials {\n\t// NOTE: unlike the default grpc/credentials implementation, we do not\n\t// clone the tls.Config which allows us to update it dynamically\n\tserverConfig.config.NextProtos = alpnProtoStr","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/pkg/comm/creds.go#L6-L42","documentation":"Sentinel error returned by DynamicClientCredentials.ServerHandshake: these are client-side credentials and do not implement the server handshake path. Exported as ErrServerHandshakeNotImplemented; encountering it indicates wrong credentials type passed to a server.","triggerScenarios":"Thrown at internal/pkg/comm/creds.go:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass server transport credentials to grpc server options","Use DynamicClientCredentials only on the client side"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}