aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object/signature.go
diff options
context:
space:
mode:
authorYoav Amit <yoav@squareup.com>2024-08-20 18:37:02 -0400
committerYoav Amit <yoav@squareup.com>2024-08-20 18:37:02 -0400
commit970c5307bdf728c9fb3d338be99d419139f4ecec (patch)
treee133f66065081584a53880f25a91a16e4bfee88c /plumbing/object/signature.go
parent4fd9979d5c2940e72bdd6946fec21e02d959f0f6 (diff)
downloadgo-git-970c5307bdf728c9fb3d338be99d419139f4ecec.tar.gz
plumbing: signature, support the same x509 signature formats as git
Commits and tags signed with x509 certificates may be encoded with the `SIGNED MESSAGE` PEM label. This behavior is consistent in [git](https://github.com/git/git/blob/master/gpg-interface.c\#L63) and [gpgsm](https://github.com/gpg/gnupg/blob/master/sm/sign.c\#L650) which is commonly used to produce these types of signatures.
Diffstat (limited to 'plumbing/object/signature.go')
-rw-r--r--plumbing/object/signature.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/plumbing/object/signature.go b/plumbing/object/signature.go
index 91cf371..f9c3d30 100644
--- a/plumbing/object/signature.go
+++ b/plumbing/object/signature.go
@@ -19,6 +19,7 @@ var (
// a PKCS#7 (S/MIME) signature.
x509SignatureFormat = signatureFormat{
[]byte("-----BEGIN CERTIFICATE-----"),
+ []byte("-----BEGIN SIGNED MESSAGE-----"),
}
// sshSignatureFormat is the format of an SSH signature.