Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Chandler <wchandler@gitlab.com>2023-06-27 20:42:26 +0300
committerWill Chandler <wchandler@gitlab.com>2023-06-27 20:42:26 +0300
commit75e1d9446d325bf64e196daf40730ee960e8e773 (patch)
tree8a866e90620b9219f3fc8aaf9fe36607c9beaaec /internal/git2go
parentd212e45fda0b7688f8b2297b51453df3ad529c33 (diff)
parent67c7405b54c126b645a77f61ba25194d8368a8e6 (diff)
Merge branch 'id-extract-ssh-into-library' into 'master'
Move SSH signing function to library See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/5960 Merged-by: Will Chandler <wchandler@gitlab.com> Approved-by: Will Chandler <wchandler@gitlab.com> Approved-by: John Cai <jcai@gitlab.com> Reviewed-by: Igor Drozdov <idrozdov@gitlab.com> Reviewed-by: John Cai <jcai@gitlab.com> Co-authored-by: Igor Drozdov <idrozdov@gitlab.com>
Diffstat (limited to 'internal/git2go')
-rw-r--r--internal/git2go/commit_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/git2go/commit_test.go b/internal/git2go/commit_test.go
index d3c476a5e..ea49c0e5e 100644
--- a/internal/git2go/commit_test.go
+++ b/internal/git2go/commit_test.go
@@ -14,12 +14,11 @@ import (
"github.com/ProtonMail/go-crypto/openpgp"
"github.com/ProtonMail/go-crypto/openpgp/packet"
"github.com/stretchr/testify/require"
- "gitlab.com/gitlab-org/gitaly/v16/cmd/gitaly-git2go/git2goutil"
"gitlab.com/gitlab-org/gitaly/v16/internal/git"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/gittest"
"gitlab.com/gitlab-org/gitaly/v16/internal/git/localrepo"
"gitlab.com/gitlab-org/gitaly/v16/internal/gitaly/config"
- "gitlab.com/gitlab-org/gitaly/v16/internal/gpg"
+ "gitlab.com/gitlab-org/gitaly/v16/internal/signature"
"gitlab.com/gitlab-org/gitaly/v16/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/v16/internal/testhelper/testcfg"
)
@@ -525,7 +524,7 @@ func TestExecutor_Commit(t *testing.T) {
testCommit: func(tb testing.TB, commitID git.ObjectID, key signingKey) {
gpgsig, dataWithoutGpgSig := extractSignature(t, ctx, repo, commitID)
- err := git2goutil.VerifySSHSignature(key.path+".pub", []byte(gpgsig), []byte(dataWithoutGpgSig))
+ err := signature.VerifySSH(key.path+".pub", []byte(gpgsig), []byte(dataWithoutGpgSig))
require.NoError(tb, err)
// Verify that the generated signature equals the one generated by Git for the identical content.
@@ -625,7 +624,7 @@ func extractSignature(tb testing.TB, ctx context.Context, repo *localrepo.Repo,
data, err := repo.ReadObject(ctx, oid)
require.NoError(tb, err)
- return gpg.ExtractSignature(tb, ctx, data)
+ return signature.ExtractSignature(tb, ctx, data)
}
func defaultCommitAuthorSignature() Signature {