diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-08-14 09:22:50 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-08-14 09:22:50 +0800 |
commit | 4f37f2b00c3971232e69774a3e04c03bdc8bb215 (patch) | |
tree | 71bb0007c98c216858b286eda08188c4a1c7c3e0 | |
parent | 7f01f3e1d98207f8101016091c997d4c18ffb152 (diff) | |
download | gsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.tar gsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.tar.gz gsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.tar.bz2 gsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.tar.lz gsoc2013-evolution-4f37f2b00c3971232e69774a3e04c03bdc8bb215.tar.xz 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
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-crypto.c | 26 |
2 files changed, 26 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index cb3301af21..62abf833ca 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2000-08-13 Jeffrey Stedfast <fejj@helixcode.com> + + * mail-crypto.c (mail_crypto_openpgp_encrypt): Added support for + encrypting via PGP 5.0 + 2000-08-13 Ettore Perazzoli <ettore@helixcode.com> * mail-ops.c (cleanup_create_folder): Release the listener object 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"; |