From f2ab6e99e82b9c99b5cc491c0a5acc61fa722c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Schr=C3=B6der?= Date: Thu, 12 Jan 2023 17:31:30 +0100 Subject: [PATCH] client: ignore empty filename for RemoteCertificateFile --- config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.go b/config.go index cd53c324..677f285a 100644 --- a/config.go +++ b/config.go @@ -174,6 +174,10 @@ func RemoteCertificate(cert []byte) Option { // in PEM or DER encoding. func RemoteCertificateFile(filename string) Option { return func(cfg *Config) { + if filename == "" { + return + } + cert, err := loadCertificate(filename) if err != nil { cfg.setError(err)