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>
This commit is contained in:
Robin Jarry 2022-07-18 15:22:34 +02:00
parent 011d41de7e
commit 52f7d3f900

View file

@ -69,7 +69,7 @@ func (s *Signer) Close() (err error) {
s.w.Write([]byte("\r\n")) s.w.Write([]byte("\r\n"))
var signedHeader textproto.Header 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) signatureWriter, err := s.mw.CreatePart(signedHeader)
if err != nil { if err != nil {
return err return err