drop AuthTLS option and use server TLSConfig option

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-04-20 12:22:43 +03:00
parent b0cad975e4
commit 683eb62973
2 changed files with 2 additions and 11 deletions

View File

@@ -188,10 +188,8 @@ func (g *grpcServer) getMaxMsgSize() int {
}
func (g *grpcServer) getCredentials() credentials.TransportCredentials {
if g.opts.Context != nil {
if v, ok := g.opts.Context.Value(tlsAuth{}).(*tls.Config); ok && v != nil {
return credentials.NewTLS(v)
}
if g.opts.TLSConfig != nil {
return credentials.NewTLS(g.opts.TLSConfig)
}
return nil
}