Commit Graph

48 Commits

Author SHA1 Message Date
e0053bce8e Updated. (request_password): Same.
2003-01-17  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-session.c (do_get_pass): Updated.
	(request_password): Same.

	* mail-send-recv.c (mail_send): Fixed to use EAccountService.

	* mail-config-druid.c (make_account): Updated to use EAccount and
	friends.

	* mail-account-gui.c (service_check_supported): Updated to use
	EAccountService.
	(mail_account_gui_new): Ref the account passed in and also update
	to use EAccount objects.
	(save_service): Updated to use an EAccountService.
	(add_new_store): Updated to use an EAccount.
	(mail_account_gui_save): Updated to use EAccounts.
	(setup_signatures): Updated because the new account->id->def_sig
	is now an int and not a structure pointer.

	* mail-account-editor.c (construct): Updated.
	(mail_account_editor_new): Now takes an EAccount object as an
	argument instead of a MailConfigAccount.

	* mail-crypto.c (mail_crypto_get_pgp_cipher_context): Updated to
	use EAccounts.

	* subscribe-dialog.c (populate_store_foreach): Removed.
	(populate_store_list): Can't use populate_store_foreach here
	because of the change to EAccountList so do it manually.

	* mail-vfolder.c (uri_is_ignore): Rewrote to use EAccountList and
	EIterator and all that fun.

	* mail-send-recv.c (build_dialogue): Updated to use EAccountList
	and EAccount object stuff. *ugh*
	(mail_send_receive): Here too.
	(mail_autoreceive_setup): Same.

	* mail-callbacks.c (check_send_configuration): Updated.
	(composer_get_message): Updated.
	(compose_msg): "
	(list_add_addresses): "
	(guess_me): "
	(guess_me_from_accounts): Same.
	(forward_get_composer): Here too.
	(mail_generate_reply): Same.
	(redirect_get_composer): "
	(empty_trash): And finally here.

	* mail-accounts.c (account_edit_clicked): Updated.
	(account_delete_clicked): Same.
	(account_default_clicked): Here too.
	(account_able_clicked): "
	(account_cursor_change): "
	(mail_accounts_load): Again here.

	* folder-browser.c (folder_browser_is_drafts): Updated to use
	EAccountList and EAccount stuff.
	(folder_browser_is_sent): Same.

	* component-factory.c (mail_load_storages): Updated to use
	EAccount and EAccountList stuff.
	(owner_set_cb): Same.
	(send_receive_cb): Here too.

	* mail-config.c: Rewritten to use EAccount and EAccountList
	objects.

svn path=/trunk/; revision=19509
2003-01-17 23:31:27 +00:00
f9804e1193 Commented out stuff that doesn't build yet. Also fixed idl build rule.
2002-11-13  Not Zed  <NotZed@Ximian.com>

	* Makefile.am: Commented out stuff that doesn't build yet.  Also
	fixed idl build rule.  importers still not built.

	* main.c (main): bonobactivationise.  remove push visual/colormap.
	(main): no longer activate activation, let bonobo_init do it.

	* mail-signature-editor.c (menu_help): Change help api.

	* mail-session.c (user_message_destroy_noreply): removed.  Not
	used?

	* mail-local.c (load_metainfo): xml root->children.

	* mail-format.c (g_string_append_len): Removed, it exists now.

2002-11-12  Not Zed  <NotZed@Ximian.com>

	* subscribe-dialog.c: gnome2ised, use gtkdialog.
	(subscribe_get_global_extras): use a weak ref rather than destroy signal.

	* message-tag-followup.c: gnome2ised.

	* message-tag-editor.c: gnome2ised & converted to gtkdialog.

	* message-list.c: gnome2ised.
	(message_list_finalise): From destroy method.  maybe should be
	destroy still.

	* message-browser.c: port to gnome2
	(message_browser_finalise): renamed from destroy method.

	* mail-stream-gtkhtml.c: removed redundant
	camel_class_get_global_classfuncs() call.

	* mail-signature-editor.c: gtkdialogised, & bonobo api changes.


	* mail-search-dialogue.c: gtkdialogised.

	* mail-folder-cache.c: cleaned up camel ref/hook casts.

	* mail-composer-prefs.c (mail_composer_prefs_get_type): convert to
	gtype.

	* mail-font-prefs.c (mail_font_prefs_destroy): from finalise.

	* mail-config.c: s/bonobo_config/e_config_listener/
	Added /apps/Evolution prefix to the evolution keys.
	Changed to use e_config_listener, etc.
	(mail_config_init): remove bonobo_config stuff.
	(mail_config_check_service): gtk dialogise.
	(check_response): from check_cancelled.

	* mail-config-druid.c (mail_config_druid_destroy): renamed from
	_finalize, turned into destroy handler.
	(construct): set type to toplevel, GTK_WINDOW_DIALOG no longer exists.

	* mail-config-factory.c (mail_config_register_factory): bonobo api
	changes.

	* mail-crypto.c (mail_crypto_get_pgp_cipher_context): cleaned up
	unref casts.

	* mail-display.c (write_data_to_file): gnome->gtkdialog.
	(on_link_clicked): use ascii_str*cmp on url.
	(save_part): g_path stuff.
	(launch_cb): gtk dialog.
	(pixmap_press): de-oafify.
	(pixbuf_for_mime_type): gnome-vfs api changes.
	(do_attachment_header): Change the pixmap to a gtkimage.
	(do_signature): "
	(pixbuf_gen_idle): "
	(do_attachment_header): ascii_str*cmp
	(do_attachment_header): gnome pixmap->gtkimage.
	(mail_display_destroy): protect against gtk mentalness.
	(html_button_press_event): ascii_str*cmp
	(drag_data_get_cb): added comment for translators of filename.

	* mail-format.c (component_supports): de-oafise.
	(is_anonymous): ascii_strncmp
	(attachment_header): remove utf8<>locale stuff, and gnomevfs api
	changes.
	(format_mime_part): fix g_strdown call.
	(write_field_row_begin): kill utf8->gtk stuff.
	(write_address): "
	(default_header_index): ascii_strcasecmp
	(handle_text_plain): "
	(handle_text_enriched): "
	(handle_multipart_encrypted): remove utf/gtk stuff.
	(handle_message_external_body): ascii_str*cmp

	* mail-identify.c (mail_identify_mime_part):
	(identify_by_magic): gnome vfs api changes.

	* mail-importer.c: Converted.

	* mail-local.c (load_metainfo): xml childs -> children.
	(mls_get_folder): g_strerror.
	(mls_delete_folder): g_strerror.
	(reconfigure_got_folder): Gnome->GtkDialog
	(reconfigure_response): from reconfigure_clicked.

	* mail-mt.c (mail_msg_check_error): gnome -> gtk dialog
	(error_response): renmae from error_gone.  destroy widget on any
	response.

	* mail-offline-handler.c (impl_finalise): renamed from
	impl_destroy since thats what it should be anyway.

	* mail-ops.c: removed utf8 widget conversion & camel_object_un/ref
	casts.

	* mail-preferences.c (mail_preferences_get_type): glib2'ised.

	* mail-search.c (mail_search_finalise): renmaed from destroy &
	properly chain.
	(mail_search_get_type): glib2 & make gtkdialog parent.
	(entry_run_search): run search when entry activated.  not sure if
	gtkdialog has anohter way to do this on an arbitrary widget.

	* mail-send-recv.c (dialogue_response): renamed from clicked.  Use
	gtkdialog.

	* mail-session.c (request_password_deleted): removed, redundant.
	(pass_response): rename from pass_got, changed for gtkdialog.
	(user_message_destroy): Removed, redundant.
	(user_message_response): Renamed from user_message_clicked.

2002-11-11  Not Zed  <NotZed@Ximian.com>

	* mail-stream-gtkhtml.c (mail_stream_gtkhtml_class_init): dont use
	get_global_classfuncs, just get the type

	* mail-tools.c: converted gnome2 api's.

	* mail-vfolder.c (vfolder_editor_response): clicked->response.
	(vfolder_editor_destroy): Removed.
	(vfolder_edit): gtk dialog api
	(edit_rule_response): clicked->response.
	(vfolder_edit_rule): gnomedialog->gtkdialog.
	(vfolder_gui_add_rule): "
	(new_rule_clicked): clicked->response

svn path=/trunk/; revision=18723
2002-11-12 14:59:35 +00:00
5f38b1e898 Don't need to pass a path to camel_gpg_context_new () anymore.
2002-10-16  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-format.c (handle_multipart_signed): Don't need to pass a
	path to camel_gpg_context_new () anymore.
	(mail_get_message_body): Same here.
	(handle_multipart_encrypted): Use camel_gpg_context_new () instead
	of mail_crypto_get_pgp_cipher_context ().

	* mail-preferences.c (mail_preferences_construct): There's no
	security tab anymore.
	(mail_preferences_apply): No need to save any pgp config data,
	there's nothing to configure!

	* mail-crypto.c (mail_crypto_get_pgp_cipher_context): Updated to
	not pass a pgp path into camel_gpg_context_new ().

	* mail-config.c (mail_config_clear): No need to free a pgp_path
	variable anymore, we don't need one.
	(config_read): Don't read in a pgp-path or pgp-type anymore.
	(mail_config_write_on_exit): Don't save a pgp-path or pgp-type
	anymore, we don't use them.
	(pgpopen): Removed.
	(pgpclose): Removed.
	(mail_config_pgp_type_detect_from_path): Removed.
	(auto_detect_pgp_variables): Removed.
	(mail_config_get_pgp_type): Removed.
	(mail_config_set_pgp_type): Removed.
	(mail_config_get_pgp_path): Removed.
	(mail_config_set_pgp_path): Removed.

svn path=/trunk/; revision=18384
2002-10-17 03:04:11 +00:00
47400a031c Don't allow the pgp type to be anything except NONE or GPG.
2002-06-26  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-config.c (config_read): Don't allow the pgp type to be
	anything except NONE or GPG.

	* mail-preferences.c (mail_preferences_apply): Don't allow someone
	to use anything other than GnuPG.

	* mail-crypto.c (mail_crypto_get_pgp_cipher_context): No need to
	handle pgp5 or pgp6 types anymore since we are no longer
	supporting them. Ding dong the witch is dead!

	* mail-format.c (handle_multipart_encrypted): Rewritten to use
	camel_multipart_encrypted_decrypt.

	* mail-crypto.c (mail_crypto_pgp_mime_part_verify): Removed.
	(mail_crypto_pgp_mime_part_encrypt): Removed.
	(mail_crypto_pgp_mime_part_decrypt): Are we seeing a trend yet?

svn path=/trunk/; revision=17301
2002-06-26 21:14:09 +00:00
83f5888387 Some compiler warning fixes.
2002-06-25  Jeffrey Stedfast  <fejj@ximian.com>

	* component-factory.c (mail_add_storage): Some compiler warning
	fixes.

	* mail-crypto.c (mail_crypto_pgp_mime_part_sign): Removed.
	(mail_crypto_get_pgp_cipher_context): New convenience function to
	construct a pgp cipher context.
	(mail_crypto_pgp_mime_part_verify): Use the new
	get_pgp_cipher_context function.
	(mail_crypto_pgp_mime_part_encrypt): Same.
	(mail_crypto_pgp_mime_part_decrypt): Here too.

	* mail-account-gui.c (mail_account_gui_new): Initialise the
	pgp_always_trust checkbox.
	(mail_account_gui_save): Get whether or not to always_trust the
	user's pgp keys.

	* mail-config.c (account_copy): Copy over the pgp_always_trust
	option.
	(config_read): Read in the always_trust option.
	(mail_config_write): Save the always_trust option.

svn path=/trunk/; revision=17277
2002-06-25 19:55:00 +00:00
34993bc0fe If the pgp type is gpg, then use the gpg context.
2002-06-21  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_pgp_mime_part_verify): If the pgp
	type is gpg, then use the gpg context.
	(mail_crypto_pgp_mime_part_sign): Same.
	(mail_crypto_pgp_mime_part_encrypt): Same.
	(mail_crypto_pgp_mime_part_decrypt): Same.

	* mail-format.c (handle_multipart_signed): Use the new gpg cipher
	context.

svn path=/trunk/; revision=17253
2002-06-22 04:56:05 +00:00
4ca07463a0 More fixing of the license texts.
svn path=/trunk/; revision=14217
2001-10-27 18:21:05 +00:00
f06f7a2836 Update to not send the remember-passphrase option to the context, it
2001-09-25  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-format.c (decode_pgp): Update to not send the
	remember-passphrase option to the context, it doesn't need it
	anymore.
	(try_inline_pgp_sig): Same.

	* mail-accounts.c (construct): The remember-passphrase option is
	no longer there. This can now be set on the passphrase prompt
	dialog.
	(construct): Add confirm expunge options.

	* mail-config.c (config_read): We no longer read-in the
	remember-passphrase state because we no longer need it.
	(mail_config_write_on_exit): We no longer save it either.
	(mail_config_get_remember_pgp_passphrase): Removed.
	(mail_config_set_remember_pgp_passphrase): Removed.

	* mail-crypto.c (mail_crypto_pgp_mime_part_sign): No longer do we
	need to send the remember passphrase state to the pgp context.
	(mail_crypto_pgp_mime_part_verify): Same.
	(mail_crypto_pgp_mime_part_encrypt): Here too.
	(mail_crypto_pgp_mime_part_decrypt): And here.

svn path=/trunk/; revision=13139
2001-09-26 00:09:09 +00:00
25efa799ee Update to pass in the `remember' argument when creating a new pgp context.
2001-07-09  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-format.c (decode_pgp): Update to pass in the `remember'
	argument when creating a new pgp context.
	(try_inline_pgp_sig): And here...

	* mail-crypto.c (mail_crypto_pgp_mime_part_sign): Update to pass
	in the `remember' argument when creating a new pgp context.
	(mail_crypto_pgp_mime_part_verify): Same.
	(mail_crypto_pgp_mime_part_encrypt): And here...
	(mail_crypto_pgp_mime_part_decrypt): And finally here.

	* mail-config.c (mail_config_get_remember_pgp_passphrase): New.
	(mail_config_set_remember_pgp_passphrase): New.
	(config_read): Read in the "remember passphrase" value.
	(mail_config_write_on_exit): Save the remember-passphrase value.

	* mail-accounts.c (construct): Allow the user to set "Remember PGP
	Passphrase".
	(remember_pgp_passphrase_toggled): Set the toggle state.

svn path=/trunk/; revision=10934
2001-07-09 21:39:38 +00:00
29315f8157 Update to pass in the `remember' argument when creating a new pgp context.
2001-07-09  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_pgp_mime_part_sign): Update to pass
	in the `remember' argument when creating a new pgp context.
	(mail_crypto_pgp_mime_part_verify): Same.
	(mail_crypto_pgp_mime_part_encrypt): And here...
	(mail_crypto_pgp_mime_part_decrypt): And finally here.

	* mail-config.c (mail_config_get_remember_pgp_passphrase): New.
	(mail_config_set_remember_pgp_passphrase): New.
	(config_read): Read in the "remember passphrase" value.
	(mail_config_write_on_exit): Save the remember-passphrase value.

	* mail-accounts.c (construct): Allow the user to set "Remember PGP
	Passphrase".
	(remember_pgp_passphrase_toggled): Set the toggle state.

svn path=/trunk/; revision=10933
2001-07-09 21:35:11 +00:00
e6b36266c7 Removed the code to check for the validity of an S/MIME part. Stuff works
2001-05-31  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-format.c (handle_multipart_signed): Removed the code to
	check for the validity of an S/MIME part. Stuff works differently
	now.

	* mail-crypto.c: Rewrote how the S/MIME stuff is going to work.

svn path=/trunk/; revision=10066
2001-05-31 20:37:06 +00:00
d8fcf58700 Removed (this now exists in camel/camel-smime.c).
2001-05-16  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_is_smime_v3_signed): Removed (this
	now exists in camel/camel-smime.c).
	(mail_crypto_is_pkcs7_mime): Same.
	(mail_crypto_smime_part_sign): new
	(mail_crypto_smime_part_verify): new
	(mail_crypto_smime_part_encrypt): new
	(mail_crypto_smime_part_decrypt): new
	(mail_crypto_pgp_mime_part_sign): Added code to set an exception
	if the context fails to be created.
	(mail_crypto_pgp_mime_part_verify): And here...
	(mail_crypto_pgp_mime_part_encrypt): Same.
	(mail_crypto_pgp_mime_part_decrypt): And here too.

svn path=/trunk/; revision=9856
2001-05-16 21:33:17 +00:00
b0795401c7 Make sure we have a context before we try and use it.
2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_pgp_mime_part_sign): Make sure we
	have a context before we try and use it.

svn path=/trunk/; revision=9496
2001-04-23 00:21:42 +00:00
4e3776a37d Only use non-NULL contexts. (mail_crypto_pgp_mime_part_encrypt): Same.
2001-04-14  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_pgp_mime_part_verify): Only use
	non-NULL contexts.
	(mail_crypto_pgp_mime_part_encrypt): Same.
	(mail_crypto_pgp_mime_part_decrypt): And here too.

	* mail-format.c (try_inline_pgp_sig): Make sure to not use the
	context if it is NULL.
	(decode_pgp): Same.

	* folder-browser-factory.c: Added stuff for filtering/vfoldering
	on mailinglists.

svn path=/trunk/; revision=9315
2001-04-14 21:24:07 +00:00
a125cbdcb5 Use the CamelCipherHash enum. (mail_crypto_pgp_mime_part_verify): Use a
2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_pgp_mime_part_sign): Use the
	CamelCipherHash enum.
	(mail_crypto_pgp_mime_part_verify): Use a CamelCipherValidity.

	* mail-format.c (try_inline_pgp_sig): Updated to use
	CamelCipherValidity instead of CamelPgpValidity.
	(handle_multipart_signed): Same.

svn path=/trunk/; revision=9284
2001-04-12 21:25:52 +00:00
769f404db3 Updated for changes to PGP code.
2001-04-12  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-accounts.c (pgp_path_changed): Updated for changes to PGP
	code.

	* component-factory.c (owner_set_cb): Don't init openpgp anymore
	because we don't need it.

	* mail-crypto.c: Simply wrap the camel-pgp-mime functions (also
	renamed the functions to be prefixed with mail_crypto).

	* mail-format.c (handle_multipart_signed): Update to use
	camel_pgp_mime_is_rfc2015_signed() and other camel-pgp-mime
	functions.
	(handle_multipart_encrypted): Same but for rfc2015_encrypted.
	(decode_pgp): Updated to use camel-pgp-context
	(try_inline_pgp): Updated to use camel-pgp-context's.
	(try_inline_pgp_sig): Same.

svn path=/trunk/; revision=9269
2001-04-12 17:14:20 +00:00
7c72692382 Huh, somehow I forgot to apply the from filter when verifying signed
2001-04-11  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (pgp_mime_part_verify): Huh, somehow I forgot to
	apply the from filter when verifying signed parts. Oh well,
	probably not all that common. Fixed now though.

svn path=/trunk/; revision=9248
2001-04-11 20:17:57 +00:00
57574f0be3 Cleaned up #includes. Remove unneccesary includes of <gnome.h>,
2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>

	* *.*: Cleaned up #includes. Remove unneccesary includes of
	<gnome.h>, <gtk/gtk.h>, <bonobo.h> and replaced with more
	fine grained headers where needed. Also marked a bunch of
	strings for translations and added some missing prototypes.

svn path=/trunk/; revision=9025
2001-03-29 20:53:17 +00:00
02adc1ca5f unref the standard folders. (owner_set_cb): Use g_atexit() to call
2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>

	* component-factory.c (unref_standard_folders): unref the standard
	folders.
	(owner_set_cb): Use g_atexit() to call unref_standard_folders()
	when evolution-mail exits. This should solve the problem where
	these folders are not synced when evolution-mail closes (because
	they still had refs on them on close).

svn path=/trunk/; revision=8814
2001-03-19 04:16:40 +00:00
b3ddd59899 New function to prepare the mime part and any subparts for pgp signing.
2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (pgp_mime_part_sign_prepare_part): New function to
	prepare the mime part and any subparts for pgp signing.
	(pgp_mime_part_sign_restore_part): New convenience function to
	undo the prepare_part.
	(pgp_mime_part_sign): Don't assume the part passed in is a leaf
	part, we could very easily get a multipart (and in fact were which
	is why people have been having unexpected results when signing
	messages with attachments) and set the encoding as if it were a
	leaf part. Use our 2 new convenience functions to set the
	encoding(s) instead.

svn path=/trunk/; revision=8766
2001-03-17 00:11:55 +00:00
ae05d707ad New function to decide if a mime part is an S/MIME v3 signed part.
2001-03-07  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (mail_crypto_is_smime_v3_signed): New function to
	decide if a mime part is an S/MIME v3 signed part.
	(mail_crypto_is_pkcs7_mime): New function to decide if a mime part
	is an application/pkcs7-mime part (or an application/octet-stream
	part with application/pkcs7-mime data).

svn path=/trunk/; revision=8578
2001-03-07 06:37:18 +00:00
6daf98ee0a Correcty set the mime type for the multipart. Hmmm, still doesn't wrap
2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (pgp_mime_part_sign): Correcty set the mime type
	for the multipart. Hmmm, still doesn't wrap correctly. NotZed?
	Ideas?
	(pgp_mime_part_encrypt): Here too.

svn path=/trunk/; revision=8559
2001-03-05 17:47:01 +00:00
8738bf7aff Changed to use PgpValidity.
2001-02-21  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-crypto.c (pgp_mime_part_verify): Changed to use
	PgpValidity.

	* openpgp-utils.c (openpgp_verify): Return a PgpValidity and set
	the description as UTF-8 for later use in mail-format.c when
	writing to GtkHTML.

	* mail-format.c (try_inline_pgp_sig): Updated to use the new
	PgpValidity code.
	(handle_multipart_signed): Updated.

svn path=/trunk/; revision=8320
2001-02-21 17:24:13 +00:00
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