certificate.Store: Fix hostname registration check

This commit is contained in:
Adnan Maolood 2021-03-04 16:12:36 -05:00
parent 8e2ac24830
commit b38311da00

View File

@ -107,7 +107,7 @@ func (s *Store) write(scope string, cert tls.Certificate) error {
func (s *Store) Get(hostname string) (*tls.Certificate, error) {
s.mu.RLock()
defer s.mu.RUnlock()
_, ok := s.certs[hostname]
_, ok := s.scopes[hostname]
if !ok {
// Try wildcard
wildcard := strings.SplitN(hostname, ".", 2)