Switches the way client certs are provided
This commit is contained in:
parent
df793c78f2
commit
5539f6c2c6
|
@ -157,7 +157,9 @@ func Retrieve(host, port, resource string, td *TofuDigest) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if td.UseClientCert {
|
if td.UseClientCert {
|
||||||
conf.Certificates = []tls.Certificate{td.ClientCert}
|
conf.GetClientCertificate = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) {
|
||||||
|
return &td.ClientCert, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
conn, err := tls.Dial("tcp", addr, conf)
|
conn, err := tls.Dial("tcp", addr, conf)
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,3 +1,5 @@
|
||||||
module tildegit.org/sloum/bombadillo
|
module tildegit.org/sloum/bombadillo
|
||||||
|
|
||||||
go 1.10
|
go 1.10
|
||||||
|
|
||||||
|
require tildegit.org/sloum/mailcap v0.0.0-20190706214029-b787a49e9db2
|
||||||
|
|
Loading…
Reference in New Issue