1
0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-11-23 21:02:28 +01:00

certificate.Store: Support "*" wildcard pattern

This commit is contained in:
adnano 2021-02-20 18:25:37 -05:00
parent 0c30cc7590
commit 28dd6017c8

@ -89,6 +89,10 @@ func (s *Store) GetCertificate(scope string) (*tls.Certificate, error) {
cert, ok = s.Lookup("*." + wildcard[1])
}
}
if !ok {
// Try "*"
_, ok = s.Lookup("*")
}
if !ok {
return nil, errors.New("unrecognized scope")
}