summaryrefslogtreecommitdiff
path: root/rebase_test.go
diff options
context:
space:
mode:
authorRoland Shoemaker <[email protected]>2022-12-09 12:43:11 -0800
committerRoland Shoemaker <[email protected]>2022-12-09 12:43:11 -0800
commite65b1c188ccb9b4aa4863ec702c3985c382f53db (patch)
tree237ed41e94275123c13881c87ab71aeb48a86cb5 /rebase_test.go
parent4b14d29c207e9969ea62a7fe07d490b036c14722 (diff)
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.)
Diffstat (limited to 'rebase_test.go')
-rw-r--r--rebase_test.go6
1 files changed, 3 insertions, 3 deletions
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