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:
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