Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

use cert if there's no error (#154)

Guilherme Oenningb5cc2bd0d8e0
diff --git a/app/pkg/web/ssl.go b/app/pkg/web/ssl.go
index 79bfa447d..7fef8a6a5 100644
--- a/app/pkg/web/ssl.go
+++ b/app/pkg/web/ssl.go
@@ -44,7 +44,7 @@ func NewCertificateManager(certFile, keyFile, cacheDir string) (*CertificateMana
//Otherwise fallsback to a automatically generated certificate by Let's Encrypt
func (m *CertificateManager) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
if m.leaf != nil {
- if m.leaf.VerifyHostname(hello.ServerName) != nil {
+ if m.leaf.VerifyHostname(hello.ServerName) == nil {
return &m.cert, nil
}
}