Refactor client.TrustCertificate workflow

This commit is contained in:
Adnan Maolood
2020-10-31 22:34:51 -04:00
parent b9cb7fe71d
commit 65a5065250
6 changed files with 81 additions and 108 deletions

View File

@@ -146,7 +146,7 @@ func (s *Server) getCertificate(h *tls.ClientHelloInfo) (*tls.Certificate, error
func (s *Server) getCertificateFor(hostname string) (*tls.Certificate, error) {
if _, ok := s.hosts[hostname]; !ok {
return nil, ErrCertificateUnknown
return nil, ErrCertificateNotFound
}
cert, err := s.Certificates.Lookup(hostname)