Don't store wildcards in the known hosts file

This commit is contained in:
adnano
2020-09-27 15:03:46 -04:00
parent 0343248952
commit e01d59f8f6
4 changed files with 14 additions and 10 deletions

View File

@@ -22,8 +22,8 @@ func init() {
client = &gemini.Client{}
client.KnownHosts.Load()
client.TrustCertificate = func(cert *x509.Certificate, knownHosts *gemini.KnownHosts) error {
err := knownHosts.Lookup(cert)
client.TrustCertificate = func(req *gemini.Request, cert *x509.Certificate, knownHosts *gemini.KnownHosts) error {
err := knownHosts.Lookup(req.Hostname(), cert)
if err != nil {
switch err {
case gemini.ErrCertificateNotTrusted: