From e65b1c188ccb9b4aa4863ec702c3985c382f53db Mon Sep 17 00:00:00 2001 From: Roland Shoemaker Date: Fri, 9 Dec 2022 12:43:11 -0800 Subject: Replace golang.org/x/crypto/openpgp with github.com/ProtonMail/go-crypto The golang.org/x/crypto/openpgp library has been deprecated for over a year now (see golang.org/issue/44226, and the deprecation notice in the package documentation). The library is unmaintained and has a number of API and usability issues. ProtonMail maintains a community fork which is actively maintained, and for most cases is a drop-in replacement. This change switches usages of golang.org/x/crypto/openpgp/... with github.com/ProtonMail/go-crypto/openpgp/..., the only other code changes are adding a nil packet.Config to a openpgp.CheckArmoredDetachedSignature call. (This change is part of a wider effort by the Go Security team to remove usages of golang.org/x/crypto/openpgp from the Go ecosystem.) --- rebase_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rebase_test.go') diff --git a/rebase_test.go b/rebase_test.go index 779e1a5..efe93cf 100644 --- a/rebase_test.go +++ b/rebase_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "golang.org/x/crypto/openpgp" - "golang.org/x/crypto/openpgp/packet" + "github.com/ProtonMail/go-crypto/openpgp" + "github.com/ProtonMail/go-crypto/openpgp/packet" ) // Tests @@ -319,7 +319,7 @@ func checkCommitSigned(t *testing.T, entity *openpgp.Entity, commit *Commit) err return err } - _, err = openpgp.CheckArmoredDetachedSignature(openpgp.EntityList{entity}, strings.NewReader(signedData), bytes.NewBufferString(signature)) + _, err = openpgp.CheckArmoredDetachedSignature(openpgp.EntityList{entity}, strings.NewReader(signedData), bytes.NewBufferString(signature), nil) if err != nil { t.Logf("Commit is not signed correctly\n%s", commit.ContentToSign()) return err -- cgit v1.2.3