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:
authorToon Claes <toon@gitlab.com>2024-01-23 18:12:14 +0300
committerGitLab <noreply@gitlab.com>2024-01-23 18:12:14 +0300
commite6f35c6b67903143dd3657d880b768eb10653fa7 (patch)
tree71d3183fb2df292601c3a513be20026e9ec335dd /internal/signature/signature.go
parent4261fb1dccde53037494d42745c59583f6644553 (diff)
parent353daaee5bf099647db744572c7f7cabf965d42a (diff)
Merge branch 'deterministic-gpg-signature' into 'master'
fix: deterministic gpg signature See merge request https://gitlab.com/gitlab-org/gitaly/-/merge_requests/6621 Merged-by: Toon Claes <toon@gitlab.com> Approved-by: karthik nayak <knayak@gitlab.com> Approved-by: Toon Claes <toon@gitlab.com> Reviewed-by: karthik nayak <knayak@gitlab.com> Co-authored-by: Adrien <adrien@huggingface.co>
Diffstat (limited to 'internal/signature/signature.go')
-rw-r--r--internal/signature/signature.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/internal/signature/signature.go b/internal/signature/signature.go
index 6f9418aa0..ce2a7f78e 100644
--- a/internal/signature/signature.go
+++ b/internal/signature/signature.go
@@ -4,11 +4,12 @@ import (
"bytes"
"fmt"
"os"
+ "time"
)
// SigningKey is the common interface of SSH and GPG signing keys
type SigningKey interface {
- CreateSignature([]byte) ([]byte, error)
+ CreateSignature([]byte, time.Time) ([]byte, error)
Verify([]byte, []byte) error
}
@@ -61,8 +62,8 @@ func parseSigningKey(path string) (SigningKey, error) {
}
// CreateSignature uses the primary key to create a signature
-func (s *SigningKeys) CreateSignature(contentToSign []byte) ([]byte, error) {
- return s.primaryKey.CreateSignature(contentToSign)
+func (s *SigningKeys) CreateSignature(contentToSign []byte, date time.Time) ([]byte, error) {
+ return s.primaryKey.CreateSignature(contentToSign, date)
}
// Verify iterates over all signing keys and returns nil if any