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:
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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user