Only generate certificates after CertificateRequired
This commit is contained in:
parent
ae4b458964
commit
5d099a4fe1
24
client.go
24
client.go
@ -6,6 +6,7 @@ import (
|
|||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"errors"
|
"errors"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -188,7 +189,7 @@ type Client struct {
|
|||||||
CertificateStore CertificateStore
|
CertificateStore CertificateStore
|
||||||
|
|
||||||
// GetCertificate, if not nil, will be called to determine which certificate
|
// GetCertificate, if not nil, will be called to determine which certificate
|
||||||
// (if any) should be used for a request.
|
// to use when the server responds with CertificateRequired.
|
||||||
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
|
// TrustCertificate, if not nil, will be called to determine whether the
|
||||||