aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/gpg
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-07-18 15:22:34 +0200
committerRobin Jarry <robin@jarry.cc>2022-07-18 21:12:46 +0200
commit52f7d3f900e4c0e3ee8458c9479859924901a3aa (patch)
tree3fe4cab6bb70801d1fd379205dc4f217a56817c7 /lib/crypto/gpg
parent011d41de7e58c8b488a9c0ed89bd59dcb005ded8 (diff)
downloadaerc-52f7d3f900e4c0e3ee8458c9479859924901a3aa.tar.gz
gpg: set a name for the attached pgp signature part
This makes it more explicit for non pgp compatible clients. Without this, they may show "unnamed part" or "noname". Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'lib/crypto/gpg')
-rw-r--r--lib/crypto/gpg/writer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/crypto/gpg/writer.go b/lib/crypto/gpg/writer.go
index 269b4907..96d083e8 100644
--- a/lib/crypto/gpg/writer.go
+++ b/lib/crypto/gpg/writer.go
@@ -69,7 +69,7 @@ func (s *Signer) Close() (err error) {
s.w.Write([]byte("\r\n"))
var signedHeader textproto.Header
- signedHeader.Set("Content-Type", "application/pgp-signature")
+ signedHeader.Set("Content-Type", "application/pgp-signature; name=\"signature.asc\"")
signatureWriter, err := s.mw.CreatePart(signedHeader)
if err != nil {
return err