MCPcopy
hub / github.com/grpc/grpc-go / gRPCServerHandshake

Function gRPCServerHandshake

credentials/credentials_test.go:271–281  ·  view source on GitHub ↗

Server handshake implementation in gRPC.

(conn net.Conn)

Source from the content-addressed store, hash-verified

269
270// Server handshake implementation in gRPC.
271func gRPCServerHandshake(conn net.Conn) (AuthInfo, error) {
272 serverTLS, err := NewServerTLSFromFile(testdata.Path("x509/server1_cert.pem"), testdata.Path("x509/server1_key.pem"))
273 if err != nil {
274 return nil, err
275 }
276 _, serverAuthInfo, err := serverTLS.ServerHandshake(conn)
277 if err != nil {
278 return nil, err
279 }
280 return serverAuthInfo, nil
281}
282
283// Client handshake implementation in gRPC.
284func gRPCClientHandshake(conn net.Conn, lisAddr string) (AuthInfo, error) {

Callers

nothing calls this directly

Calls 3

PathFunction · 0.92
NewServerTLSFromFileFunction · 0.85
ServerHandshakeMethod · 0.65

Tested by

no test coverage detected