Skip to content

Commit

Permalink
Merge pull request #626 from gopcua/ignore-empty-cert-filename
Browse files Browse the repository at this point in the history
client: ignore empty filename for RemoteCertificateFile
  • Loading branch information
magiconair authored Jan 12, 2023
2 parents d926c5f + f2ab6e9 commit 5d369d8
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 5d369d8

Please sign in to comment.