diff options
author | Yoav Amit <yoav@squareup.com> | 2024-08-20 18:37:02 -0400 |
---|---|---|
committer | Yoav Amit <yoav@squareup.com> | 2024-08-20 18:37:02 -0400 |
commit | 970c5307bdf728c9fb3d338be99d419139f4ecec (patch) | |
tree | e133f66065081584a53880f25a91a16e4bfee88c /plumbing/object/signature.go | |
parent | 4fd9979d5c2940e72bdd6946fec21e02d959f0f6 (diff) | |
download | go-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.go | 1 |
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. |