Skip to content

Commit

Permalink
client: ignore empty filename for RemoteCertificateFile
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Jan 12, 2023
1 parent d926c5f commit f2ab6e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f2ab6e9

Please sign in to comment.