Update documentation

This commit is contained in:
Adnan Maolood
2020-10-31 23:05:31 -04:00
parent 33c1dc435d
commit 79b3b22e69
2 changed files with 10 additions and 4 deletions

View File

@@ -51,7 +51,13 @@ type Client struct {
// TrustCertificate is called to determine whether the client
// should trust a certificate it has not seen before.
// If TrustCertificate is nil, the certificate will not be trusted.
// If TrustCertificate is nil, the certificate will not be trusted
// and the connection will be aborted.
//
// If TrustCertificate returns TrustOnce, the certificate will be added
// to the client's list of known hosts.
// If TrustCertificate returns TrustAlways, the certificate will also be
// written to the known hosts file.
TrustCertificate func(hostname string, cert *x509.Certificate) Trust
}