aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2018-08-20 17:43:42 +0100
committerNiall Sheridan <nsheridan@gmail.com>2018-08-20 17:43:42 +0100
commitdbefe685912e286fce16bf9dd3773f4037cdcdf1 (patch)
tree238422f371df9f04d2c2aebd700e61d015837753 /client
parentf906c9ba422eb720514721b559c01f840ca34a0c (diff)
Small updates
- Test against 1.11 rc - Set timeouts on the http client - Use gofmt instead of goimports
Diffstat (limited to 'client')
-rw-r--r--client/client.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/client/client.go b/client/client.go
index dc4ada1..b84e09a 100644
--- a/client/client.go
+++ b/client/client.go
@@ -89,10 +89,12 @@ func send(sr *lib.SignRequest, token, ca string, ValidateTLSCertificate bool) (*
if err != nil {
return nil, errors.Wrap(err, "unable to create sign request")
}
- transport := &http.Transport{
- TLSClientConfig: &tls.Config{InsecureSkipVerify: !ValidateTLSCertificate},
+ client := &http.Client{
+ Transport: &http.Transport{
+ TLSClientConfig: &tls.Config{InsecureSkipVerify: !ValidateTLSCertificate},
+ },
+ Timeout: 30 * time.Second,
}
- client := &http.Client{Transport: transport}
u, err := url.Parse(ca)
if err != nil {
return nil, errors.Wrap(err, "unable to parse CA url")