Skip to content

Commit 20558a8

Browse files
authored
feat: bump minimum supported version to go 1.24 (#342)
* feat: bump minimum supported version to go 1.24 align with go version support policy drop go 1.24 build tags * lint: regenerate notice file
1 parent 70a1a74 commit 20558a8

File tree

7 files changed

+47
-100
lines changed

7 files changed

+47
-100
lines changed

NOTICE.txt

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,43 +2134,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21342134
THE SOFTWARE.
21352135

21362136

2137-
--------------------------------------------------------------------------------
2138-
Dependency : golang.org/x/crypto
2139-
Version: v0.36.0
2140-
Licence type (autodetected): BSD-3-Clause
2141-
--------------------------------------------------------------------------------
2142-
2143-
Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]/LICENSE:
2144-
2145-
Copyright 2009 The Go Authors.
2146-
2147-
Redistribution and use in source and binary forms, with or without
2148-
modification, are permitted provided that the following conditions are
2149-
met:
2150-
2151-
* Redistributions of source code must retain the above copyright
2152-
notice, this list of conditions and the following disclaimer.
2153-
* Redistributions in binary form must reproduce the above
2154-
copyright notice, this list of conditions and the following disclaimer
2155-
in the documentation and/or other materials provided with the
2156-
distribution.
2157-
* Neither the name of Google LLC nor the names of its
2158-
contributors may be used to endorse or promote products derived from
2159-
this software without specific prior written permission.
2160-
2161-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2162-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2163-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2164-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2165-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2166-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2167-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2168-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2169-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2170-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2171-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2172-
2173-
21742137
--------------------------------------------------------------------------------
21752138
Dependency : golang.org/x/net
21762139
Version: v0.38.0
@@ -5953,6 +5916,43 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
59535916
THE SOFTWARE.
59545917

59555918

5919+
--------------------------------------------------------------------------------
5920+
Dependency : golang.org/x/crypto
5921+
Version: v0.36.0
5922+
Licence type (autodetected): BSD-3-Clause
5923+
--------------------------------------------------------------------------------
5924+
5925+
Contents of probable licence file $GOMODCACHE/golang.org/x/[email protected]/LICENSE:
5926+
5927+
Copyright 2009 The Go Authors.
5928+
5929+
Redistribution and use in source and binary forms, with or without
5930+
modification, are permitted provided that the following conditions are
5931+
met:
5932+
5933+
* Redistributions of source code must retain the above copyright
5934+
notice, this list of conditions and the following disclaimer.
5935+
* Redistributions in binary form must reproduce the above
5936+
copyright notice, this list of conditions and the following disclaimer
5937+
in the documentation and/or other materials provided with the
5938+
distribution.
5939+
* Neither the name of Google LLC nor the names of its
5940+
contributors may be used to endorse or promote products derived from
5941+
this software without specific prior written permission.
5942+
5943+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5944+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5945+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
5946+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
5947+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5948+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5949+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5950+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5951+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5952+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5953+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5954+
5955+
59565956
--------------------------------------------------------------------------------
59575957
Dependency : golang.org/x/lint
59585958
Version: v0.0.0-20190930215403-16217165b5de

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/elastic/elastic-agent-libs
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/Microsoft/go-winio v0.5.2
@@ -20,7 +20,6 @@ require (
2020
go.elastic.co/ecszap v1.0.2
2121
go.elastic.co/go-licence-detector v0.6.0
2222
go.uber.org/zap v1.27.0
23-
golang.org/x/crypto v0.36.0
2423
golang.org/x/net v0.38.0
2524
golang.org/x/sys v0.31.0
2625
golang.org/x/text v0.23.0
@@ -53,6 +52,7 @@ require (
5352
go.opentelemetry.io/otel/metric v1.28.0 // indirect
5453
go.opentelemetry.io/otel/trace v1.28.0 // indirect
5554
go.uber.org/multierr v1.11.0 // indirect
55+
golang.org/x/crypto v0.36.0 // indirect
5656
golang.org/x/mod v0.17.0 // indirect
5757
golang.org/x/sync v0.12.0 // indirect
5858
gopkg.in/yaml.v3 v3.0.1 // indirect

keystore/file_keystore.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ package keystore
1919

2020
import (
2121
"bytes"
22+
"crypto/pbkdf2"
2223
"crypto/rand"
24+
"crypto/sha512"
2325
"encoding/base64"
2426
"encoding/json"
2527
"fmt"
@@ -137,6 +139,10 @@ func (k *FileKeystore) Retrieve(key string) (*SecureString, error) {
137139
return NewSecureString(secret.Value), nil
138140
}
139141

142+
func (k *FileKeystore) hashPassword(password string, salt []byte) ([]byte, error) {
143+
return pbkdf2.Key(sha512.New, password, salt, iterationsCount, keyLength)
144+
}
145+
140146
// Store add the key pair to the secret store and mark the store as dirty.
141147
func (k *FileKeystore) Store(key string, value []byte) error {
142148
k.Lock()

keystore/file_keystore_fips.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
//go:build go1.24 && requirefips
18+
//go:build requirefips
1919

2020
package keystore
2121

keystore/file_keystore_fips_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
//go:build go1.24 && requirefips
18+
//go:build requirefips
1919

2020
package keystore
2121

keystore/pbkdf2_go124.go

Lines changed: 0 additions & 29 deletions
This file was deleted.

keystore/pbkdf2_legacy.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)