add tls config to server (#1202)

* add tls config

* add TLSConfig to acme provider
This commit is contained in:
Asim Aslam 2020-02-15 15:10:26 +00:00 committed by Vasiliy Tolstov
parent 471d2205bd
commit d89db33c07

View File

@ -805,7 +805,14 @@ func (g *grpcServer) Start() error {
ts = l
} else {
var err error
ts, err = net.Listen("tcp", config.Address)
// check the tls config for secure connect
if tc := config.TLSConfig; tc != nil {
ts, err = tls.Listen("tcp", config.Address, tc)
// otherwise just plain tcp listener
} else {
ts, err = net.Listen("tcp", config.Address)
}
if err != nil {
return err
}