require tlsCert and tlsKey to be nonempty

Co-authored-by: kegsay <kegsay@gmail.com>
This commit is contained in:
David Robertson 2023-03-29 12:17:26 +01:00 committed by GitHub
parent d066dce13c
commit c76c04128e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
v3.go
View File

@ -160,7 +160,7 @@ func RunSyncV3Server(h http.Handler, bindAddr, destV2Server, tlsCert, tlsKey str
// Block forever
var err error
if tlsCert != "" {
if tlsCert != "" && tlsKey != "" {
logger.Info().Msgf("listening TLS on %s", bindAddr)
err = http.ListenAndServeTLS(bindAddr, tlsCert, tlsKey, srv)
} else {