Other: preserve message header in PGP/MIME passthrough message

This commit is contained in:
James Houlahan
2021-04-22 16:30:29 +02:00
parent ebf724412b
commit 4038752a9a
2 changed files with 6 additions and 3 deletions

View File

@ -219,7 +219,7 @@ func buildExternallyEncryptedRFC822(kr *crypto.KeyRing, msg *pmapi.Message, opts
return nil, errors.Wrap(ErrDecryptionFailed, err.Error())
}
return buildPGPMIMERFC822(msg)
return buildPGPMIMERFC822(msg, opts)
}
hdr := getMessageHeader(msg, opts)
@ -254,8 +254,8 @@ func buildExternallyEncryptedRFC822(kr *crypto.KeyRing, msg *pmapi.Message, opts
return buf.Bytes(), nil
}
func buildPGPMIMERFC822(msg *pmapi.Message) ([]byte, error) {
var hdr message.Header
func buildPGPMIMERFC822(msg *pmapi.Message, opts JobOptions) ([]byte, error) {
hdr := getMessageHeader(msg, opts)
hdr.SetContentType("multipart/encrypted", map[string]string{
"boundary": newBoundary(msg.ID).gen(),