aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-crypto.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-14 09:22:50 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-14 09:22:50 +0800
commit4f37f2b00c3971232e69774a3e04c03bdc8bb215 (patch)
tree71bb0007c98c216858b286eda08188c4a1c7c3e0 /mail/mail-crypto.c
parent7f01f3e1d98207f8101016091c997d4c18ffb152 (diff)
downloadgsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.tar.gz
gsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.tar.zst
gsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.zip
Added support for encrypting via PGP 5.0
2000-08-13 Jeffrey Stedfast <fejj@helixcode.com> * mail-crypto.c (mail_crypto_openpgp_encrypt): Added support for encrypting via PGP 5.0 svn path=/trunk/; revision=4831
Diffstat (limited to 'mail/mail-crypto.c')
-rw-r--r--mail/mail-crypto.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/mail/mail-crypto.c b/mail/mail-crypto.c
index 1055bb4569..71a2573eeb 100644
--- a/mail/mail-crypto.c
+++ b/mail/mail-crypto.c
@@ -465,20 +465,36 @@ mail_crypto_openpgp_encrypt (const char *plaintext,
sprintf (passwd_fd, "%d", passwd_fds[0]);
argv[i++] = passwd_fd;
}
-#elif defined(PGP5_PATH) /* FIXME: from here down needs to be modified to work correctly */
+#elif defined(PGP5_PATH)
path = PGP5_PATH;
+ recipient_list = g_ptr_array_new ();
+ for (r = 0; r < recipients->len; r++) {
+ char *buf, *recipient;
+
+ recipient = recipients->pdata[i];
+ buf = g_strdup_printf ("-r %s", recipient);
+ g_ptr_array_add (recipient_list, buf);
+ }
+
argv[i++] = "pgpe";
+
+ for (r = 0; r < recipient_list->len; r++)
+ argv[i++] = recipient_list->pdata[r];
+
argv[i++] = "-f";
argv[i++] = "-z";
argv[i++] = "-a";
+ argv[i++] = "-o";
+ argv[i++] = "-"; /* output to stdout */
- if (sign)
+ if (sign) {
argv[i++] = "-s";
- sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
- putenv (passwd_fd);
-#else
+ sprintf (passwd_fd, "PGPPASSFD=%d", passwd_fds[0]);
+ putenv (passwd_fd);
+ }
+#else /* We still gotta get pgp 2.6.3 workin here ;-) */
path = PGP_PATH;
argv[i++] = "pgp";