1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg-mail-tube: Fix content type for an attached non-plaintext.

* tools/gpg-mail-tube.c (mail_tube_encrypt): Fix content type for an
attached message.
--

We can't use message/rfc822 if we encrypt this message as a simple PGP
file.
This commit is contained in:
Werner Koch 2024-11-12 12:04:02 +01:00
parent d994ffc56a
commit 813bd4f3d2
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -549,6 +549,7 @@ mail_tube_encrypt (estream_t fpin, strlist_t recipients)
/* Output the plain or PGP/MIME boilerplate. */ /* Output the plain or PGP/MIME boilerplate. */
if (opt.as_attach) if (opt.as_attach)
{ {
/* FIXME: Need to have a configurable message here. */
es_fprintf (es_stdout, es_fprintf (es_stdout,
"\r\n" "\r\n"
"\r\n" "\r\n"
@ -570,12 +571,12 @@ mail_tube_encrypt (estream_t fpin, strlist_t recipients)
"\r\n", "pgp-encrypted-file.txt.asc"); "\r\n", "pgp-encrypted-file.txt.asc");
else else
es_fprintf (es_stdout, es_fprintf (es_stdout,
"Content-Type: message/rfc822\r\n" "Content-Type: text/plain; charset=us-ascii\r\n"
"Content-Description: PGP encrypted message\r\n" "Content-Description: PGP encrypted message\r\n"
"Content-Disposition: attachment; filename=\"%s\"\r\n" "Content-Disposition: attachment; filename=\"%s\"\r\n"
"\r\n", "pgp-encrypted-msg.eml.asc"); "\r\n", "pgp-encrypted-msg.eml.asc");
} }
else else /* PGP/MIME */
es_fprintf (es_stdout, es_fprintf (es_stdout,
"\r\n" "\r\n"
"\r\n" "\r\n"