Skip to content

Commit cdd6b79

Browse files
committed
Don't set VerifyPeerCertificate function on TLS config if authentication is disabled.
1 parent 95a1265 commit cdd6b79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,10 @@ func serverListen(context *Context) error {
442442
}
443443

444444
config.GetCertificate = context.cert.GetCertificate
445-
config.VerifyPeerCertificate = serverACL.VerifyPeerCertificateServer
446445
if *serverDisableAuth {
447446
config.ClientAuth = tls.NoClientCert
447+
} else {
448+
config.VerifyPeerCertificate = serverACL.VerifyPeerCertificateServer
448449
}
449450

450451
listener, err := reuseport.NewReusablePortListener("tcp", (*serverListenAddress).String())

0 commit comments

Comments
 (0)