diff options
| author | 2024-07-08 07:33:11 +0000 | |
|---|---|---|
| committer | 2024-07-08 07:33:11 +0000 | |
| commit | a81455e81c02d5c69b723b52c775a247313c82a2 (patch) | |
| tree | 942e036c28e3f21edf43b2f8c467eeacc8bf6795 /vendor/golang.org/x/crypto/acme | |
| parent | [chore] upstep activity to v1.7.0-gts (#3074) (diff) | |
| download | gotosocial-a81455e81c02d5c69b723b52c775a247313c82a2.tar.xz | |
[chore]: Bump golang.org/x/crypto from 0.24.0 to 0.25.0 (#3080)
Diffstat (limited to 'vendor/golang.org/x/crypto/acme')
| -rw-r--r-- | vendor/golang.org/x/crypto/acme/http.go | 21 | ||||
| -rw-r--r-- | vendor/golang.org/x/crypto/acme/version_go112.go | 27 | 
2 files changed, 20 insertions, 28 deletions
diff --git a/vendor/golang.org/x/crypto/acme/http.go b/vendor/golang.org/x/crypto/acme/http.go index 58836e5d3..d92ff232f 100644 --- a/vendor/golang.org/x/crypto/acme/http.go +++ b/vendor/golang.org/x/crypto/acme/http.go @@ -15,6 +15,7 @@ import (  	"io"  	"math/big"  	"net/http" +	"runtime/debug"  	"strconv"  	"strings"  	"time" @@ -271,9 +272,27 @@ func (c *Client) httpClient() *http.Client {  }  // packageVersion is the version of the module that contains this package, for -// sending as part of the User-Agent header. It's set in version_go112.go. +// sending as part of the User-Agent header.  var packageVersion string +func init() { +	// Set packageVersion if the binary was built in modules mode and x/crypto +	// was not replaced with a different module. +	info, ok := debug.ReadBuildInfo() +	if !ok { +		return +	} +	for _, m := range info.Deps { +		if m.Path != "golang.org/x/crypto" { +			continue +		} +		if m.Replace == nil { +			packageVersion = m.Version +		} +		break +	} +} +  // userAgent returns the User-Agent header value. It includes the package name,  // the module version (if available), and the c.UserAgent value (if set).  func (c *Client) userAgent() string { diff --git a/vendor/golang.org/x/crypto/acme/version_go112.go b/vendor/golang.org/x/crypto/acme/version_go112.go deleted file mode 100644 index cc5fab604..000000000 --- a/vendor/golang.org/x/crypto/acme/version_go112.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.12 - -package acme - -import "runtime/debug" - -func init() { -	// Set packageVersion if the binary was built in modules mode and x/crypto -	// was not replaced with a different module. -	info, ok := debug.ReadBuildInfo() -	if !ok { -		return -	} -	for _, m := range info.Deps { -		if m.Path != "golang.org/x/crypto" { -			continue -		} -		if m.Replace == nil { -			packageVersion = m.Version -		} -		break -	} -}  | 
