Commit Graph

25 Commits

Author SHA1 Message Date
62a7c2c370 A few minor tweaks.
2001-01-23  Jeffrey Stedfast  <fejj@ximian.com>

	* openpgp-utils.c:
	* mail-crypto.c: A few minor tweaks.

svn path=/trunk/; revision=7755
2001-01-23 21:14:47 +00:00
92403a5b3a Fix a double-free problem.
2001-01-23  Not Zed  <NotZed@Ximian.com>

	* mail-crypto.c (pgp_mime_part_verify): Fix a double-free problem.

svn path=/trunk/; revision=7722
2001-01-22 22:35:41 +00:00
891364e803 Helps if I spell stuff correctly so it can pass the tests ;-)
2001-01-22  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_is_rfc2015_signed): Helps if I spell
	stuff correctly so it can pass the tests ;-)

svn path=/trunk/; revision=7697
2001-01-22 05:09:11 +00:00
fb4e03c0af Don't forget to unref the filters. (pgp_mime_part_verify): Same.
2001-01-21  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (pgp_mime_part_sign): Don't forget to unref the
	filters.
	(pgp_mime_part_verify): Same.
	(pgp_mime_part_encrypt): Same.
	(pgp_mime_part_decrypt): Take NotZed's advice and use
	camel_stream_mem_new_with_buffer instead of writing to a new
	stream_mem. Also use camel_data_wrapper_construct_from_stream
	instead of creating a parser and using that.

svn path=/trunk/; revision=7687
2001-01-21 22:35:08 +00:00
e7e8b3d610 Updated header comment and fixed some ref/unref count problems in the
2001-01-21  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c: Updated header comment and fixed some ref/unref
	count problems in the various functions. Also fixed some other
	little things.
	(pgp_mime_part_encrypt): Do some canonical CRLF action before
	encrypting.
	(pgp_mime_part_sign): Make sure we are the owners of the byte array.
	(pgp_mime_part_verify): Same.
	(pgp_mime_part_encrypt): Same.
	(pgp_mime_part_decrypt): Same.

svn path=/trunk/; revision=7682
2001-01-21 08:37:57 +00:00
c8a418fefb Updated header comment and fixed some ref/unref count problems in the
2001-01-21  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c: Updated header comment and fixed some ref/unref
	count problems in the various functions. Also fixed some other
	little things.
	(pgp_mime_part_encrypt): Do some canonical CRLF action before
	encrypting.

svn path=/trunk/; revision=7680
2001-01-21 06:24:39 +00:00
8265e5d841 Updated. (decode_pgp): Get rid of #ifdef PGP_PROGRAM's and handle
2001-01-09  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c: Updated.
	(decode_pgp): Get rid of #ifdef PGP_PROGRAM's and handle
	appropriately.
	(handle_multipart_signed): Same.
	(handle_multipart_encrypted): Same.

	* Makefile.am: Added openpgp-utils.[c,h] to the build.

	* openpgp-utils.c: New source file containing all of the pgp
	interface code.

	* mail-crypto.c: Removed all of the openpgp funtions as they are
	being moved to a new file.
	(mail_crypto_is_rfc2015_signed): Renamed.
	(mail_crypto_is_rfc2015_encrypted): Renamed.

svn path=/trunk/; revision=7320
2001-01-09 18:27:59 +00:00
161d88eee6 Implemented.
2000-12-26  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-crypto.c (mail_crypto_openpgp_verify): Implemented.

2000-12-23  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (mail_do_setup_trash): New function similar to
	mail_do_setup_folder() except that this creates the Trash VFolder
	(special-case).

2000-12-21  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-ops.c (do_send_mail): Don't free info inside the last
	if-statement, if sent_folder doesn't exist we'll have a memory
	leak. Instead free it afterward.

svn path=/trunk/; revision=7205
2001-01-01 23:19:54 +00:00
d6cf6698a5 fix previous fix
svn path=/trunk/; revision=7195
2000-12-30 04:43:31 +00:00
ebe0fd91cf Update this for CamelContentType too.
svn path=/trunk/; revision=7193
2000-12-29 21:59:27 +00:00
96c13f461a New callback to handle multipart/signed parts. (decode_pgp): Update to
2000-12-15  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (handle_multipart_signed): New callback to handle
	multipart/signed parts.
	(decode_pgp): Update to account for the cipherlen argument needed
	for openpgp_decrypt.
	(is_rfc2015): Removed as we now have a better version in
	mail-crypto.
	(handle_multipart_encrypted): Updated to use the PGP/MIME utility
	functions.

	* mail-crypto.c (mail_crypto_openpgp_decrypt): Don't check
	(!*plaintext) as it could be a binary stream. Now also takes a
	cipherlen argument.
	(mail_crypto_openpgp_sign): New function.
	(pgp_mime_part_sign): New function to replace a mime part with the
	pgp signed equivalent.
	(pgp_mime_part_encrypt): New function to replace a mime part with
	the pgp encrypted equivalent.
	(pgp_mime_part_decrypt): New function to decrypt a pgp encrypted
	mime part (like from pgp_mime_part_encrypt) and replace it.
	(is_rfc2015_signed): New function to determine if a mime part is
	an rfc2015 signed part.
	(is_rfc2015_encrypted): New function to determine if a mime part
	is an rfc2015 encrypted part.
	(mail_crypto_openpgp_verify): New openpgp function to verify a
	signature.

svn path=/trunk/; revision=7056
2000-12-15 23:05:55 +00:00
6f20275b96 Updated to reflect arguments to the openpgp functions - now also takes an
2000-12-11  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-format.c (decode_pgp): Updated to reflect arguments to the
	openpgp functions - now also takes an outlen argument.
	(try_inline_pgp): Updated.
	(handle_multipart_encrypted): Updated here too.

	* mail-crypto.c (crypto_exec_with_passwd): Updated to handle
	binary streams and such.
	(mail_crypto_openpgp_encrypt): Always initialize the passwd_fds
	even if we don't plan on signing. Added an 'inlen' to specify the
	length of the input data (as it could be binary). Also added a
	'userid' argument for cases when we want to sign as well as
	encrypt.
	(mail_crypto_openpgp_decrypt): Updated to take an outlen argument
	in case the ciphertext is encrypted binary data.
	(mail_crypto_openpgp_clearsign): Added a 'hash' and 'detach'
	arguments. 'hash' allows the program to specify the preferred hash
	function (which will come in handy when generating
	PGP/MIME). 'detach' allows the program to specify whether it wants
	a detached signature or the entire signed text.

svn path=/trunk/; revision=6921
2000-12-11 23:07:01 +00:00
d39b0dfc09 Fix up #include <config.h> Same here. Here too. Fix indentation of #ifdef
2000-11-06  Kjartan Maraas  <kmaraas@gnome.org>

	* mail-autofilter.c: Fix up #include <config.h>
	* mail-crypto.c: Same here.
	* mail-search-dialog.c: Here too.
	* main.c: Fix indentation of #ifdef
	* message-thread.c: Fix include.

svn path=/trunk/; revision=6422
2000-11-06 20:49:53 +00:00
1cb19b5a1b Added new header files.
2000-11-03  Jeffrey Stedfast  <fejj@helixcode.com>

	* Makefile.am: Added new header files.

	* component-factory.c (owner_set_cb):
	s/session_init/mail_session_init

	* session.c: Renamed public functions to mail_session_*.
	FIXME: Rename session.c to mail-session.c

	* folder-browser-factory.c: #include "mail-callbacks.h", #include
	"mail-session.h" and replace forget_passwords with
	mail_session_forget_passwords

	* mail.h: Move session prototypes to mail-session.h, Move
	mail-crypto prototypes to mail-crypto.h, Move mail-callback
	prototypes to mail-callbacks.h

	* mail-session.h: New header file containing public prototypes
	for session.c

	* mail-format.c: #include "mail-crypto.h"

	* mail-view.c:
	* folder-browser.c: #include "mail-callbacks.h"

	* mail-crypto.h: New header file containing public prototypes
	for mail-crypto.c

	* mail-callbacks.h: New header file containing public prototypes
	for mail-callbacks.c

	* message-list.c (message_list_get_layout): Set useful defaults.
	(message_list_setup_etable): Don't set the Outbox defaults on a
	folder just because it doesn't have a corresponding saved file.

svn path=/trunk/; revision=6372
2000-11-03 18:55:41 +00:00
360675f54b lots of i18n fixes
svn path=/trunk/; revision=6143
2000-10-24 05:23:27 +00:00
d4f0fb515b Fix to prevent possible buffer overflows and a logic fix.
2000-08-28  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-crypto.c (mail_crypto_openpgp_encrypt): Fix to prevent
	possible buffer overflows and a logic fix.

svn path=/trunk/; revision=5071
2000-08-28 04:01:39 +00:00
08b9e2eeac Fix to prevent possible buffer overflows
2000-08-28  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-crypto.c (mail_crypto_openpgp_encrypt): Fix to prevent
	possible buffer overflows

svn path=/trunk/; revision=5070
2000-08-28 03:58:49 +00:00
2831015fa1 New crypto function to clearsign plaintext
2000-08-27  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-crypto.c (mail_crypto_openpgp_clearsign): New crypto
	function to clearsign plaintext

svn path=/trunk/; revision=5068
2000-08-27 22:13:43 +00:00
52f7c4a13d Fixed an uninitialized variable.
2000-08-25  Christopher James Lahey  <clahey@helixcode.com>

	* mail-crypto.c: Fixed an uninitialized variable.

svn path=/trunk/; revision=5057
2000-08-26 09:16:40 +00:00
0a45b2998b Implemented PGP 2.x encryption. We only need to get the passphrase if we
2000-08-25  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-crypto.c (mail_crypto_openpgp_encrypt): Implemented PGP 2.x
	encryption. We only need to get the passphrase if we plan to sign
	the text, otherwise we don't need to worry about getting the
	passphrase.

svn path=/trunk/; revision=5035
2000-08-25 17:09:39 +00:00
4f37f2b00c 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
2000-08-14 01:22:50 +00:00
ed88f23786 Update this for CamelObject (try_inline_pgp): Deal with decrypting here
* mail-format.c (destroy_part): Update this for CamelObject
        (try_inline_pgp): Deal with decrypting here rather than trying to
        pawn the data off to handle_multipart_encrypted, since it most
        likely won't be correct (won't have the proper MIME headers inside
        the encrypted part).
        (handle_multipart_encrypted): Add code from Nathan Thompson-Amato
        to re-MIME-parse the decrypted data after decrypting.

        * mail-crypto.c (mail_crypto_openpgp_{de,en}crypt): Get the
        password here rather than having it passed in. Remove some dead
        code.

        * session.c (mail_request_dialog): Allow this to work in either a
        sync or an async context.

svn path=/trunk/; revision=4751
2000-08-11 20:27:12 +00:00
ffaebb53fe Fix some compiler warnings.
* mail-crypto.c, mail-format.c, message-thread.c: Fix some
	compiler warnings.

svn path=/trunk/; revision=4615
2000-08-08 23:37:31 +00:00
43e3ba9da9 Added support for encrypting with GnuPG. Support for PGP5 and PGP2 are
2000-08-06  Jeffrey Stedfast  <fejj@helixcode.com>

	* mail-crypto.c (mail_crypto_openpgp_encrypt): Added support for
	encrypting with GnuPG.  Support for PGP5 and PGP2 are still in
	progress.

svn path=/trunk/; revision=4557
2000-08-06 06:34:14 +00:00
324b1e8675 New code to spawn off GPG/PGP to do stuff. Currently only deals with
* mail-crypto.c: New code to spawn off GPG/PGP to do stuff.
	Currently only deals with decryption. From Nathan Thompson-Amato
	<ndt@jps.net>, with bunches of changes from me.

	* session.c (mail_request_dialog): Expose the password dialog to
	the rest of the app (for use by the GPG/PGP code).

	* mail-format.c (handle_text_plain): Handle special inline data
	types. (Currently uuencoding, BinHex, and PGP encryption.) This is
	not the best way to deal with it, but it works for now.
	(try_inline_pgp): Convert an inline PGP-encrypted message into a
	multipart/encrypted part.
	(try_inline_binhex): Convert an inline BinHex attachment into an
	application/mac-binhex40 part (which we currently don't deal
	with...)
	(try_uudecoding): Convert a uuencoded attachment to an
	application/octet-stream part.
	(handle_multipart_encrypted): Deal with RFC2015 MIME-encoded PGP
	encrypted messages. (From ndt.)

	* mail-display.c (mail_text_write, mail_error_write): New utility
	functions.

	* Makefile.am (evolution_mail_SOURCES): add mail-crypto.c

svn path=/trunk/; revision=4466
2000-08-02 02:56:48 +00:00