aboutsummaryrefslogtreecommitdiff
path: root/client.go
diff options
context:
space:
mode:
authoradnano <[email protected]>2020-10-12 16:34:52 -0400
committeradnano <[email protected]>2020-10-12 16:34:59 -0400
commita33a5be0634cbbca6c6f8eb2fd53bceb014fed02 (patch)
treea23fdfdab8807baa8a604023f25d729f3edaabf1 /client.go
parentUse a map for registering server handlers (diff)
downloadgo-gemini-a33a5be0634cbbca6c6f8eb2fd53bceb014fed02.tar.xz
go-gemini-a33a5be0634cbbca6c6f8eb2fd53bceb014fed02.zip
Update documentation
Diffstat (limited to 'client.go')
-rw-r--r--client.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/client.go b/client.go
index 5a2512c..ee0797f 100644
--- a/client.go
+++ b/client.go
@@ -198,7 +198,7 @@ type Client struct {
// The returned certificate will be used when sending the request again.
// If the certificate is nil, the request will not be sent again and
// the response will be returned.
- GetCertificate func(hostname string, store CertificateStore) *tls.Certificate
+ GetCertificate func(hostname string, store *CertificateStore) *tls.Certificate
// TrustCertificate, if not nil, will be called to determine whether the
// client should trust the given certificate.
@@ -279,7 +279,7 @@ func (c *Client) Send(req *Request) (*Response, error) {
return resp, nil
}
if c.GetCertificate != nil {
- if cert := c.GetCertificate(req.Hostname(), c.CertificateStore); cert != nil {
+ if cert := c.GetCertificate(req.Hostname(), &c.CertificateStore); cert != nil {
req.Certificate = cert
return c.Send(req)
}