From 2eb7fb9ba48751cb26efd6324285be3f1f4a98da Mon Sep 17 00:00:00 2001 From: adnano Date: Sun, 27 Sep 2020 13:50:48 -0400 Subject: Implement certificate creation --- client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client.go') diff --git a/client.go b/client.go index 7af5792..57c144a 100644 --- a/client.go +++ b/client.go @@ -205,8 +205,8 @@ func (c *Client) Send(req *Request) (*Response, error) { return err } // Check that the certificate is valid for the hostname - if cert.Subject.CommonName != hostname(req.Host) { - return ErrCertificateNotValid + if err := cert.VerifyHostname(req.Host); err != nil { + return err } // Check that the client trusts the certificate if c.TrustCertificate == nil { -- cgit v1.2.3