Merge pull request #214 from smallstep/build-with-go.1.13

Use go 1.13 to build certificates
This commit is contained in:
Mariano Cano 2020-03-24 16:32:32 -07:00 committed by GitHub
commit 83993d31d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,6 @@
language: go language: go
go: go:
- 1.14.x - 1.13.x
addons: addons:
apt: apt:
packages: packages:

View file

@ -57,7 +57,7 @@ func (c *Client) getClientTLSConfig(ctx context.Context, sign *api.SignResponse,
} }
// Use mutable tls.Config on renew // Use mutable tls.Config on renew
tr.DialTLS = c.buildDialTLS(tlsCtx) //nolint:deprecated tr.DialTLS = c.buildDialTLS(tlsCtx) //nolint:deprecated
tr.DialTLSContext = c.buildDialTLSContext(tlsCtx) // tr.DialTLSContext = c.buildDialTLSContext(tlsCtx)
renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk) renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk)
// Update client transport // Update client transport
@ -109,7 +109,7 @@ func (c *Client) GetServerTLSConfig(ctx context.Context, sign *api.SignResponse,
} }
// Use mutable tls.Config on renew // Use mutable tls.Config on renew
tr.DialTLS = c.buildDialTLS(tlsCtx) //nolint:deprecated tr.DialTLS = c.buildDialTLS(tlsCtx) //nolint:deprecated
tr.DialTLSContext = c.buildDialTLSContext(tlsCtx) // tr.DialTLSContext = c.buildDialTLSContext(tlsCtx)
renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk) renewer.RenewCertificate = getRenewFunc(tlsCtx, c, tr, pk)
// Update client transport // Update client transport
@ -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. // 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) { 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) { return func(ctx context.Context, network, addr string) (net.Conn, error) {
// TLS dialers do not support context, but we can use the context // TLS dialers do not support context, but we can use the context