diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-09-10 07:07:01 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-09-10 07:07:01 +0000 |
commit | 55f3cbdecc3e30021d63b07c51afb21bf51c5660 (patch) | |
tree | 59b74288163acb0f3486a6a7dfd840d6a7557ec7 /src/compose.c | |
parent | 284963f5167cda1da99d60d23f8b91a7a2fc51a3 (diff) |
use combined method for encrypt and sign with PGP/MIME.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1893 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/compose.c')
-rw-r--r-- | src/compose.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/compose.c b/src/compose.c index 2831e8c5..f30502a5 100644 --- a/src/compose.c +++ b/src/compose.c @@ -3406,7 +3406,7 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, } } - if (use_pgpmime_signing) { + if (use_pgpmime_signing && !use_pgpmime_encryption) { GSList *key_list; if (compose_create_signers_list(compose, &key_list) < 0 || @@ -3414,8 +3414,9 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, g_unlink(file); return -1; } - } - if (use_pgpmime_encryption) { + } else if (use_pgpmime_encryption) { + GSList *key_list; + if (compose->use_bcc) { const gchar *text; gchar *bcc; @@ -3439,7 +3440,15 @@ static gint compose_write_to_file(Compose *compose, const gchar *file, } } } - if (rfc2015_encrypt(file, compose->to_list) < 0) { + if (use_pgpmime_signing) { + if (compose_create_signers_list + (compose, &key_list) < 0 || + rfc2015_encrypt_sign(file, compose->to_list, + key_list) < 0) { + g_unlink(file); + return -1; + } + } else if (rfc2015_encrypt(file, compose->to_list) < 0) { g_unlink(file); return -1; } |