From 9ff9bec0f79354865cc3dbf13c56c8c028566c39 Mon Sep 17 00:00:00 2001 From: Michal Budzyn Date: Sun, 9 Feb 2025 22:16:53 +0100 Subject: [PATCH] Use xdg-go/scram --- go.mod | 5 +- go.sum | 10 +- proxy/sasl_scram.go | 2 +- vendor/github.com/xdg-go/pbkdf2/.gitignore | 12 ++ .../{xdg/scram => xdg-go/pbkdf2}/LICENSE | 0 vendor/github.com/xdg-go/pbkdf2/README.md | 17 ++ vendor/github.com/xdg-go/pbkdf2/pbkdf2.go | 76 ++++++++ .../{xdg => xdg-go}/scram/.gitignore | 0 vendor/github.com/xdg-go/scram/CHANGELOG.md | 26 +++ .../{xdg/stringprep => xdg-go/scram}/LICENSE | 0 .../{xdg => xdg-go}/scram/README.md | 7 +- .../{xdg => xdg-go}/scram/client.go | 2 +- .../{xdg => xdg-go}/scram/client_conv.go | 0 .../{xdg => xdg-go}/scram/common.go | 0 .../github.com/{xdg => xdg-go}/scram/doc.go | 6 +- .../github.com/{xdg => xdg-go}/scram/parse.go | 0 .../github.com/{xdg => xdg-go}/scram/scram.go | 7 +- .../{xdg => xdg-go}/scram/server.go | 0 .../{xdg => xdg-go}/scram/server_conv.go | 0 .../{xdg => xdg-go}/stringprep/.gitignore | 0 .../github.com/xdg-go/stringprep/CHANGELOG.md | 36 ++++ vendor/github.com/xdg-go/stringprep/LICENSE | 175 ++++++++++++++++++ .../{xdg => xdg-go}/stringprep/README.md | 7 +- .../{xdg => xdg-go}/stringprep/bidi.go | 0 .../{xdg => xdg-go}/stringprep/doc.go | 0 .../{xdg => xdg-go}/stringprep/error.go | 0 .../{xdg => xdg-go}/stringprep/map.go | 0 .../{xdg => xdg-go}/stringprep/profile.go | 0 .../{xdg => xdg-go}/stringprep/saslprep.go | 0 .../{xdg => xdg-go}/stringprep/set.go | 0 .../{xdg => xdg-go}/stringprep/tables.go | 0 vendor/github.com/xdg/scram/.travis.yml | 11 -- vendor/github.com/xdg/stringprep/.travis.yml | 10 - vendor/modules.txt | 15 +- 34 files changed, 380 insertions(+), 44 deletions(-) create mode 100644 vendor/github.com/xdg-go/pbkdf2/.gitignore rename vendor/github.com/{xdg/scram => xdg-go/pbkdf2}/LICENSE (100%) create mode 100644 vendor/github.com/xdg-go/pbkdf2/README.md create mode 100644 vendor/github.com/xdg-go/pbkdf2/pbkdf2.go rename vendor/github.com/{xdg => xdg-go}/scram/.gitignore (100%) create mode 100644 vendor/github.com/xdg-go/scram/CHANGELOG.md rename vendor/github.com/{xdg/stringprep => xdg-go/scram}/LICENSE (100%) rename vendor/github.com/{xdg => xdg-go}/scram/README.md (81%) rename vendor/github.com/{xdg => xdg-go}/scram/client.go (99%) rename vendor/github.com/{xdg => xdg-go}/scram/client_conv.go (100%) rename vendor/github.com/{xdg => xdg-go}/scram/common.go (100%) rename vendor/github.com/{xdg => xdg-go}/scram/doc.go (76%) rename vendor/github.com/{xdg => xdg-go}/scram/parse.go (100%) rename vendor/github.com/{xdg => xdg-go}/scram/scram.go (91%) rename vendor/github.com/{xdg => xdg-go}/scram/server.go (100%) rename vendor/github.com/{xdg => xdg-go}/scram/server_conv.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/.gitignore (100%) create mode 100644 vendor/github.com/xdg-go/stringprep/CHANGELOG.md create mode 100644 vendor/github.com/xdg-go/stringprep/LICENSE rename vendor/github.com/{xdg => xdg-go}/stringprep/README.md (55%) rename vendor/github.com/{xdg => xdg-go}/stringprep/bidi.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/doc.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/error.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/map.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/profile.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/saslprep.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/set.go (100%) rename vendor/github.com/{xdg => xdg-go}/stringprep/tables.go (100%) delete mode 100644 vendor/github.com/xdg/scram/.travis.yml delete mode 100644 vendor/github.com/xdg/stringprep/.travis.yml diff --git a/go.mod b/go.mod index 6435be0a..0b7e270c 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.0.2 github.com/stretchr/testify v1.10.0 - github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c + github.com/xdg-go/scram v1.1.2 golang.org/x/net v0.34.0 golang.org/x/oauth2 v0.24.0 google.golang.org/api v0.126.0 @@ -81,7 +81,8 @@ require ( github.com/spf13/cast v1.2.0 // indirect github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/xdg/stringprep v1.0.0 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.33.0 // indirect diff --git a/go.sum b/go.sum index 9af94217..935e6801 100644 --- a/go.sum +++ b/go.sum @@ -279,10 +279,12 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c h1:u40Z8hqBAAQyv+vATcGgV0YCnDjqSL7/q/JyPhhJSPk= -github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= -github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0= -github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 h1:ilQV1hzziu+LLM3zUTJ0trRztfwgjqKnBWNtSRkbmwM= github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78/go.mod h1:aL8wCCfTfSfmXjznFBSZNN13rSJjlIOI1fUNAtF7rmI= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= diff --git a/proxy/sasl_scram.go b/proxy/sasl_scram.go index 7b45eaed..328c5857 100644 --- a/proxy/sasl_scram.go +++ b/proxy/sasl_scram.go @@ -8,7 +8,7 @@ import ( "fmt" "github.com/grepplabs/kafka-proxy/proxy/protocol" "github.com/sirupsen/logrus" - "github.com/xdg/scram" + "github.com/xdg-go/scram" "hash" "io" "time" diff --git a/vendor/github.com/xdg-go/pbkdf2/.gitignore b/vendor/github.com/xdg-go/pbkdf2/.gitignore new file mode 100644 index 00000000..f1c181ec --- /dev/null +++ b/vendor/github.com/xdg-go/pbkdf2/.gitignore @@ -0,0 +1,12 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out diff --git a/vendor/github.com/xdg/scram/LICENSE b/vendor/github.com/xdg-go/pbkdf2/LICENSE similarity index 100% rename from vendor/github.com/xdg/scram/LICENSE rename to vendor/github.com/xdg-go/pbkdf2/LICENSE diff --git a/vendor/github.com/xdg-go/pbkdf2/README.md b/vendor/github.com/xdg-go/pbkdf2/README.md new file mode 100644 index 00000000..d2824e45 --- /dev/null +++ b/vendor/github.com/xdg-go/pbkdf2/README.md @@ -0,0 +1,17 @@ +[![Go Reference](https://pkg.go.dev/badge/github.com/xdg-go/pbkdf2.svg)](https://pkg.go.dev/github.com/xdg-go/pbkdf2) +[![Go Report Card](https://goreportcard.com/badge/github.com/xdg-go/pbkdf2)](https://goreportcard.com/report/github.com/xdg-go/pbkdf2) +[![Github Actions](https://github.com/xdg-go/pbkdf2/actions/workflows/test.yml/badge.svg)](https://github.com/xdg-go/pbkdf2/actions/workflows/test.yml) + +# pbkdf2 – Go implementation of PBKDF2 + +## Description + +Package pbkdf2 provides password-based key derivation based on +[RFC 8018](https://tools.ietf.org/html/rfc8018). + +## Copyright and License + +Copyright 2021 by David A. Golden. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"). You may +obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 diff --git a/vendor/github.com/xdg-go/pbkdf2/pbkdf2.go b/vendor/github.com/xdg-go/pbkdf2/pbkdf2.go new file mode 100644 index 00000000..029945ca --- /dev/null +++ b/vendor/github.com/xdg-go/pbkdf2/pbkdf2.go @@ -0,0 +1,76 @@ +// Copyright 2021 by David A. Golden. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 + +// Package pbkdf2 implements password-based key derivation using the PBKDF2 +// algorithm described in RFC 2898 and RFC 8018. +// +// It provides a drop-in replacement for `golang.org/x/crypto/pbkdf2`, with +// the following benefits: +// +// - Released as a module with semantic versioning +// +// - Does not pull in dependencies for unrelated `x/crypto/*` packages +// +// - Supports Go 1.9+ +// +// See https://tools.ietf.org/html/rfc8018#section-4 for security considerations +// in the selection of a salt and iteration count. +package pbkdf2 + +import ( + "crypto/hmac" + "encoding/binary" + "hash" +) + +// Key generates a derived key from a password using the PBKDF2 algorithm. The +// inputs include salt bytes, the iteration count, desired key length, and a +// constructor for a hashing function. For example, for a 32-byte key using +// SHA-256: +// +// key := Key([]byte("trustNo1"), salt, 10000, 32, sha256.New) +func Key(password, salt []byte, iterCount, keyLen int, h func() hash.Hash) []byte { + prf := hmac.New(h, password) + hLen := prf.Size() + numBlocks := keyLen / hLen + // Get an extra block if keyLen is not an even number of hLen blocks. + if keyLen%hLen > 0 { + numBlocks++ + } + + Ti := make([]byte, hLen) + Uj := make([]byte, hLen) + dk := make([]byte, 0, hLen*numBlocks) + buf := make([]byte, 4) + + for i := uint32(1); i <= uint32(numBlocks); i++ { + // Initialize Uj for j == 1 from salt and block index. + // Initialize Ti = U1. + binary.BigEndian.PutUint32(buf, i) + prf.Reset() + prf.Write(salt) + prf.Write(buf) + Uj = Uj[:0] + Uj = prf.Sum(Uj) + + // Ti = U1 ^ U2 ^ ... ^ Ux + copy(Ti, Uj) + for j := 2; j <= iterCount; j++ { + prf.Reset() + prf.Write(Uj) + Uj = Uj[:0] + Uj = prf.Sum(Uj) + for k := range Uj { + Ti[k] ^= Uj[k] + } + } + + // DK = concat(T1, T2, ... Tn) + dk = append(dk, Ti...) + } + + return dk[0:keyLen] +} diff --git a/vendor/github.com/xdg/scram/.gitignore b/vendor/github.com/xdg-go/scram/.gitignore similarity index 100% rename from vendor/github.com/xdg/scram/.gitignore rename to vendor/github.com/xdg-go/scram/.gitignore diff --git a/vendor/github.com/xdg-go/scram/CHANGELOG.md b/vendor/github.com/xdg-go/scram/CHANGELOG.md new file mode 100644 index 00000000..b833be5e --- /dev/null +++ b/vendor/github.com/xdg-go/scram/CHANGELOG.md @@ -0,0 +1,26 @@ +# CHANGELOG + +## v1.1.2 - 2022-12-07 + +- Bump stringprep dependency to v1.0.4 for upstream CVE fix. + +## v1.1.1 - 2022-03-03 + +- Bump stringprep dependency to v1.0.3 for upstream CVE fix. + +## v1.1.0 - 2022-01-16 + +- Add SHA-512 hash generator function for convenience. + +## v1.0.2 - 2021-03-28 + +- Switch PBKDF2 dependency to github.com/xdg-go/pbkdf2 to + minimize transitive dependencies and support Go 1.9+. + +## v1.0.1 - 2021-03-27 + +- Bump stringprep dependency to v1.0.2 for Go 1.11 support. + +## v1.0.0 - 2021-03-27 + +- First release as a Go module diff --git a/vendor/github.com/xdg/stringprep/LICENSE b/vendor/github.com/xdg-go/scram/LICENSE similarity index 100% rename from vendor/github.com/xdg/stringprep/LICENSE rename to vendor/github.com/xdg-go/scram/LICENSE diff --git a/vendor/github.com/xdg/scram/README.md b/vendor/github.com/xdg-go/scram/README.md similarity index 81% rename from vendor/github.com/xdg/scram/README.md rename to vendor/github.com/xdg-go/scram/README.md index 6782d94d..3a46f5ce 100644 --- a/vendor/github.com/xdg/scram/README.md +++ b/vendor/github.com/xdg-go/scram/README.md @@ -1,5 +1,6 @@ -[![GoDoc](https://godoc.org/github.com/xdg/scram?status.svg)](https://godoc.org/github.com/xdg/scram) -[![Build Status](https://travis-ci.org/xdg/scram.svg?branch=master)](https://travis-ci.org/xdg/scram) +[![Go Reference](https://pkg.go.dev/badge/github.com/xdg-go/scram.svg)](https://pkg.go.dev/github.com/xdg-go/scram) +[![Go Report Card](https://goreportcard.com/badge/github.com/xdg-go/scram)](https://goreportcard.com/report/github.com/xdg-go/scram) +[![Github Actions](https://github.com/xdg-go/scram/actions/workflows/test.yml/badge.svg)](https://github.com/xdg-go/scram/actions/workflows/test.yml) # scram – Go implementation of RFC-5802 @@ -20,7 +21,7 @@ Channel binding and extensions are not (yet) supported. package main - import "github.com/xdg/scram" + import "github.com/xdg-go/scram" func main() { // Get Client with username, password and (optional) authorization ID. diff --git a/vendor/github.com/xdg/scram/client.go b/vendor/github.com/xdg-go/scram/client.go similarity index 99% rename from vendor/github.com/xdg/scram/client.go rename to vendor/github.com/xdg-go/scram/client.go index ca0c4c71..5b53021b 100644 --- a/vendor/github.com/xdg/scram/client.go +++ b/vendor/github.com/xdg-go/scram/client.go @@ -9,7 +9,7 @@ package scram import ( "sync" - "golang.org/x/crypto/pbkdf2" + "github.com/xdg-go/pbkdf2" ) // Client implements the client side of SCRAM authentication. It holds diff --git a/vendor/github.com/xdg/scram/client_conv.go b/vendor/github.com/xdg-go/scram/client_conv.go similarity index 100% rename from vendor/github.com/xdg/scram/client_conv.go rename to vendor/github.com/xdg-go/scram/client_conv.go diff --git a/vendor/github.com/xdg/scram/common.go b/vendor/github.com/xdg-go/scram/common.go similarity index 100% rename from vendor/github.com/xdg/scram/common.go rename to vendor/github.com/xdg-go/scram/common.go diff --git a/vendor/github.com/xdg/scram/doc.go b/vendor/github.com/xdg-go/scram/doc.go similarity index 76% rename from vendor/github.com/xdg/scram/doc.go rename to vendor/github.com/xdg-go/scram/doc.go index d43bee60..82e8aeed 100644 --- a/vendor/github.com/xdg/scram/doc.go +++ b/vendor/github.com/xdg-go/scram/doc.go @@ -10,14 +10,16 @@ // // Usage // -// The scram package provides two variables, `SHA1` and `SHA256`, that are -// used to construct Client or Server objects. +// The scram package provides variables, `SHA1`, `SHA256`, and `SHA512`, that +// are used to construct Client or Server objects. // // clientSHA1, err := scram.SHA1.NewClient(username, password, authID) // clientSHA256, err := scram.SHA256.NewClient(username, password, authID) +// clientSHA512, err := scram.SHA512.NewClient(username, password, authID) // // serverSHA1, err := scram.SHA1.NewServer(credentialLookupFcn) // serverSHA256, err := scram.SHA256.NewServer(credentialLookupFcn) +// serverSHA512, err := scram.SHA512.NewServer(credentialLookupFcn) // // These objects are used to construct ClientConversation or // ServerConversation objects that are used to carry out authentication. diff --git a/vendor/github.com/xdg/scram/parse.go b/vendor/github.com/xdg-go/scram/parse.go similarity index 100% rename from vendor/github.com/xdg/scram/parse.go rename to vendor/github.com/xdg-go/scram/parse.go diff --git a/vendor/github.com/xdg/scram/scram.go b/vendor/github.com/xdg-go/scram/scram.go similarity index 91% rename from vendor/github.com/xdg/scram/scram.go rename to vendor/github.com/xdg-go/scram/scram.go index 9e9836af..a7b36602 100644 --- a/vendor/github.com/xdg/scram/scram.go +++ b/vendor/github.com/xdg-go/scram/scram.go @@ -9,10 +9,11 @@ package scram import ( "crypto/sha1" "crypto/sha256" + "crypto/sha512" "fmt" "hash" - "github.com/xdg/stringprep" + "github.com/xdg-go/stringprep" ) // HashGeneratorFcn abstracts a factory function that returns a hash.Hash @@ -29,6 +30,10 @@ var SHA1 HashGeneratorFcn = func() hash.Hash { return sha1.New() } // to create Client objects configured for SHA-256 hashing. var SHA256 HashGeneratorFcn = func() hash.Hash { return sha256.New() } +// SHA512 is a function that returns a crypto/sha512 hasher and should be used +// to create Client objects configured for SHA-512 hashing. +var SHA512 HashGeneratorFcn = func() hash.Hash { return sha512.New() } + // NewClient constructs a SCRAM client component based on a given hash.Hash // factory receiver. This constructor will normalize the username, password // and authzID via the SASLprep algorithm, as recommended by RFC-5802. If diff --git a/vendor/github.com/xdg/scram/server.go b/vendor/github.com/xdg-go/scram/server.go similarity index 100% rename from vendor/github.com/xdg/scram/server.go rename to vendor/github.com/xdg-go/scram/server.go diff --git a/vendor/github.com/xdg/scram/server_conv.go b/vendor/github.com/xdg-go/scram/server_conv.go similarity index 100% rename from vendor/github.com/xdg/scram/server_conv.go rename to vendor/github.com/xdg-go/scram/server_conv.go diff --git a/vendor/github.com/xdg/stringprep/.gitignore b/vendor/github.com/xdg-go/stringprep/.gitignore similarity index 100% rename from vendor/github.com/xdg/stringprep/.gitignore rename to vendor/github.com/xdg-go/stringprep/.gitignore diff --git a/vendor/github.com/xdg-go/stringprep/CHANGELOG.md b/vendor/github.com/xdg-go/stringprep/CHANGELOG.md new file mode 100644 index 00000000..04b9753c --- /dev/null +++ b/vendor/github.com/xdg-go/stringprep/CHANGELOG.md @@ -0,0 +1,36 @@ +# CHANGELOG + + +## [v1.0.4] - 2022-12-07 + +### Maintenance + +- Bump golang.org/x/text to v0.3.8 due to CVE-2022-32149 + + +## [v1.0.3] - 2022-03-01 + +### Maintenance + +- Bump golang.org/x/text to v0.3.7 due to CVE-2021-38561 + + +## [v1.0.2] - 2021-03-27 + +### Maintenance + +- Change minimum Go version to 1.11 + + +## [v1.0.1] - 2021-03-24 + +### Bug Fixes + +- Add go.mod file + + +## [v1.0.0] - 2018-02-21 + +[v1.0.2]: https://github.com/xdg-go/stringprep/releases/tag/v1.0.2 +[v1.0.1]: https://github.com/xdg-go/stringprep/releases/tag/v1.0.1 +[v1.0.0]: https://github.com/xdg-go/stringprep/releases/tag/v1.0.0 diff --git a/vendor/github.com/xdg-go/stringprep/LICENSE b/vendor/github.com/xdg-go/stringprep/LICENSE new file mode 100644 index 00000000..67db8588 --- /dev/null +++ b/vendor/github.com/xdg-go/stringprep/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/vendor/github.com/xdg/stringprep/README.md b/vendor/github.com/xdg-go/stringprep/README.md similarity index 55% rename from vendor/github.com/xdg/stringprep/README.md rename to vendor/github.com/xdg-go/stringprep/README.md index 87279e3e..83ea5346 100644 --- a/vendor/github.com/xdg/stringprep/README.md +++ b/vendor/github.com/xdg-go/stringprep/README.md @@ -1,12 +1,13 @@ -[![GoDoc](https://godoc.org/github.com/xdg/stringprep?status.svg)](https://godoc.org/github.com/xdg/stringprep) -[![Build Status](https://travis-ci.org/xdg/stringprep.svg?branch=master)](https://travis-ci.org/xdg/stringprep) +[![Go Reference](https://pkg.go.dev/badge/github.com/xdg-go/stringprep.svg)](https://pkg.go.dev/github.com/xdg-go/stringprep) +[![Go Report Card](https://goreportcard.com/badge/github.com/xdg-go/stringprep)](https://goreportcard.com/report/github.com/xdg-go/stringprep) +[![Github Actions](https://github.com/xdg-go/stringprep/actions/workflows/test.yml/badge.svg)](https://github.com/xdg-go/stringprep/actions/workflows/test.yml) # stringprep – Go implementation of RFC-3454 stringprep and RFC-4013 SASLprep ## Synopsis ``` - import "github.com/xdg/stringprep" + import "github.com/xdg-go/stringprep" prepped := stringprep.SASLprep.Prepare("TrustNô1") diff --git a/vendor/github.com/xdg/stringprep/bidi.go b/vendor/github.com/xdg-go/stringprep/bidi.go similarity index 100% rename from vendor/github.com/xdg/stringprep/bidi.go rename to vendor/github.com/xdg-go/stringprep/bidi.go diff --git a/vendor/github.com/xdg/stringprep/doc.go b/vendor/github.com/xdg-go/stringprep/doc.go similarity index 100% rename from vendor/github.com/xdg/stringprep/doc.go rename to vendor/github.com/xdg-go/stringprep/doc.go diff --git a/vendor/github.com/xdg/stringprep/error.go b/vendor/github.com/xdg-go/stringprep/error.go similarity index 100% rename from vendor/github.com/xdg/stringprep/error.go rename to vendor/github.com/xdg-go/stringprep/error.go diff --git a/vendor/github.com/xdg/stringprep/map.go b/vendor/github.com/xdg-go/stringprep/map.go similarity index 100% rename from vendor/github.com/xdg/stringprep/map.go rename to vendor/github.com/xdg-go/stringprep/map.go diff --git a/vendor/github.com/xdg/stringprep/profile.go b/vendor/github.com/xdg-go/stringprep/profile.go similarity index 100% rename from vendor/github.com/xdg/stringprep/profile.go rename to vendor/github.com/xdg-go/stringprep/profile.go diff --git a/vendor/github.com/xdg/stringprep/saslprep.go b/vendor/github.com/xdg-go/stringprep/saslprep.go similarity index 100% rename from vendor/github.com/xdg/stringprep/saslprep.go rename to vendor/github.com/xdg-go/stringprep/saslprep.go diff --git a/vendor/github.com/xdg/stringprep/set.go b/vendor/github.com/xdg-go/stringprep/set.go similarity index 100% rename from vendor/github.com/xdg/stringprep/set.go rename to vendor/github.com/xdg-go/stringprep/set.go diff --git a/vendor/github.com/xdg/stringprep/tables.go b/vendor/github.com/xdg-go/stringprep/tables.go similarity index 100% rename from vendor/github.com/xdg/stringprep/tables.go rename to vendor/github.com/xdg-go/stringprep/tables.go diff --git a/vendor/github.com/xdg/scram/.travis.yml b/vendor/github.com/xdg/scram/.travis.yml deleted file mode 100644 index f391327e..00000000 --- a/vendor/github.com/xdg/scram/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: go -sudo: false -go: - - "1.7" - - "1.8" - - "1.9" - - "1.10" - - master -matrix: - allow_failures: - - go: master diff --git a/vendor/github.com/xdg/stringprep/.travis.yml b/vendor/github.com/xdg/stringprep/.travis.yml deleted file mode 100644 index 376c53a7..00000000 --- a/vendor/github.com/xdg/stringprep/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: go -sudo: false -go: - - 1.7 - - 1.8 - - 1.9 - - master -matrix: - allow_failures: - - go: master diff --git a/vendor/modules.txt b/vendor/modules.txt index 91e92fb6..3c2da288 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -344,12 +344,15 @@ github.com/spf13/viper ## explicit; go 1.17 github.com/stretchr/testify/assert github.com/stretchr/testify/assert/yaml -# github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c -## explicit -github.com/xdg/scram -# github.com/xdg/stringprep v1.0.0 -## explicit -github.com/xdg/stringprep +# github.com/xdg-go/pbkdf2 v1.0.0 +## explicit; go 1.9 +github.com/xdg-go/pbkdf2 +# github.com/xdg-go/scram v1.1.2 +## explicit; go 1.11 +github.com/xdg-go/scram +# github.com/xdg-go/stringprep v1.0.4 +## explicit; go 1.11 +github.com/xdg-go/stringprep # github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 ## explicit; go 1.17 github.com/youmark/pkcs8