add tls config to server (#1202)
* add tls config * add TLSConfig to acme provider
This commit is contained in:
parent
471d2205bd
commit
d89db33c07
9
grpc.go
9
grpc.go
@ -805,7 +805,14 @@ func (g *grpcServer) Start() error {
|
|||||||
ts = l
|
ts = l
|
||||||
} else {
|
} else {
|
||||||
var err error
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user