Add a 'signature.asc' filename for PGP MIME signatures.
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 21 Jun 2017 19:04:22 +0000 (21:04 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 21 Jun 2017 19:04:22 +0000 (21:04 +0200)
This requires Content-Disposition MIME header to be set.
We set the disposition to "inline". Closes bug #3836.

src/plugins/pgpmime/pgpmime.c

index e14ebe0..f9b459d 100644 (file)
@@ -599,6 +599,10 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
        newinfo->data.mem = g_malloc(len + 1);
        g_memmove(newinfo->data.mem, sigcontent, len);
        newinfo->data.mem[len] = '\0';
+       newinfo->disposition = DISPOSITIONTYPE_INLINE;
+       g_hash_table_insert(newinfo->dispositionparameters,
+                       g_strdup("filename"), g_strdup("signature.asc"));
+
        g_node_append(sigmultipart->node, newinfo->node);
 
        g_free(sigcontent);