From 0b62ce9d0eaa39716ebaa27719b13b0780e07c08 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 24 Mar 2020 14:23:02 -0700 Subject: [PATCH 1/2] Use go 1.13 to build certificates. --- .travis.yml | 2 +- ca/tls.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b85988dc..1be30e69 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: -- 1.14.x +- 1.13.x addons: apt: packages: diff --git a/ca/tls.go b/ca/tls.go index 2441b2d6..ca5af652 100644 --- a/ca/tls.go +++ b/ca/tls.go @@ -57,7 +57,7 @@ func (c *Client) getClientTLSConfig(ctx context.Context, sign *api.SignResponse, } // Use mutable tls.Config on renew tr.DialTLS = c.buildDialTLS(tlsCtx) //nolint:deprecated - tr.DialTLSContext = c.buildDialTLSContext(tlsCtx) + // tr.DialTLSContext = c.buildDialTLSContext(tlsCtx) renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk) // Update client transport @@ -109,7 +109,7 @@ func (c *Client) GetServerTLSConfig(ctx context.Context, sign *api.SignResponse, } // Use mutable tls.Config on renew tr.DialTLS = c.buildDialTLS(tlsCtx) //nolint:deprecated - tr.DialTLSContext = c.buildDialTLSContext(tlsCtx) + // tr.DialTLSContext = c.buildDialTLSContext(tlsCtx) renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk) // Update client transport From 1d7ab9145aa6d8f0bb7684e17cf2359a001c69f6 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Tue, 24 Mar 2020 14:33:01 -0700 Subject: [PATCH 2/2] Avoid lint error. --- ca/tls.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ca/tls.go b/ca/tls.go index ca5af652..ffae68e5 100644 --- a/ca/tls.go +++ b/ca/tls.go @@ -153,6 +153,7 @@ func (c *Client) buildDialTLS(ctx *TLSOptionCtx) func(network, addr string) (net } // buildDialTLSContext returns an implementation of DialTLSContext callback in http.Transport. +// nolint:unused func (c *Client) buildDialTLSContext(tlsCtx *TLSOptionCtx) func(ctx context.Context, network, addr string) (net.Conn, error) { return func(ctx context.Context, network, addr string) (net.Conn, error) { // TLS dialers do not support context, but we can use the context