Differentiate between unknown and untrusted certificates

This commit is contained in:
adnano
2020-09-26 13:27:03 -04:00
parent fc96076472
commit bf3e6b3c5c
4 changed files with 62 additions and 7 deletions

View File

@@ -15,9 +15,9 @@ import (
var (
client = &gemini.Client{
TrustCertificate: func(cert *x509.Certificate, knownHosts *gemini.KnownHosts) bool {
TrustCertificate: func(cert *x509.Certificate, knownHosts *gemini.KnownHosts) error {
// Trust all certificates
return true
return nil
},
}
cert tls.Certificate