diff --git a/common/net/tls.go b/common/net/tls.go index 5e1c81f2..e51324f7 100644 --- a/common/net/tls.go +++ b/common/net/tls.go @@ -11,7 +11,7 @@ import ( ) func ParseCert(certificate, privateKey string) (tls.Certificate, error) { - if certificate == "" || privateKey == "" { + if certificate == "" && privateKey == "" { return newRandomTLSKeyPair() } cert, painTextErr := tls.X509KeyPair([]byte(certificate), []byte(privateKey))