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 GitHub
parent 158949d0d0
commit 964b7dee3f
9 changed files with 114 additions and 18 deletions

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
}