aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-gpg-context.c
Commit message (Collapse)AuthorAgeFilesLines
* Renamed stdin to stdin_fd, stdout to stdout_fd, and stderr to stderr_fd inJeffrey Stedfast2002-07-111-33/+33
| | | | | | | | | | | 2002-07-10 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c: Renamed stdin to stdin_fd, stdout to stdout_fd, and stderr to stderr_fd in struct _GpgCtx since Solaris' stdin/stdout/etderr variables seem to be macros and are thus breaking the compilation. svn path=/trunk/; revision=17409
* Don't use --no-auto-key-retrieve, this option has apparently beenJeffrey Stedfast2002-06-291-4/+10
| | | | | | | | | | 2002-06-28 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_argv): Don't use --no-auto-key-retrieve, this option has apparently been deprecated in gpg 1.0.7. svn path=/trunk/; revision=17321
* Loop on our reads while errno is EINTR or EAGAIN. Also make sure toJeffrey Stedfast2002-06-281-19/+51
| | | | | | | | | | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. Also make sure to completely read stdout and stderr by keeping better state. (gpg_ctx_parse_status): In the case of a NODATA response from gpg, try to use the diagnostics that gpg may have written to its stderr. (gpg_verify): Check that the gpg process has not exited. (gpg_ctx_op_wait): Make sure we haven't already exited (as by gpg_ctx_op_is_exited()) and if we have, retrieve the exit status from the gpg context. svn path=/trunk/; revision=17320
* Loop on our reads while errno is EINTR or EAGAIN. Also make sure toJeffrey Stedfast2002-06-281-3/+10
| | | | | | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. Also make sure to completely read stdout and stderr by keeping better state. (gpg_ctx_parse_status): In the case of a NODATA response from gpg, try to use the diagnostics that gpg may have written to its stderr. svn path=/trunk/; revision=17319
* Loop on our reads while errno is EINTR or EAGAIN. Also make sure toJeffrey Stedfast2002-06-281-22/+18
| | | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. Also make sure to completely read stdout and stderr by keeping better state. svn path=/trunk/; revision=17311
* Loop on our reads while errno is EINTR or EAGAIN.Jeffrey Stedfast2002-06-271-9/+20
| | | | | | | | | 2002-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_op_step): Loop on our reads while errno is EINTR or EAGAIN. svn path=/trunk/; revision=17307
* Removed (never did anything anyway).Jeffrey Stedfast2002-06-271-13/+0
| | | | | | | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_clearsign): Removed (never did anything anyway). * camel-pgp-context.c (pgp_clearsign): Removed. * camel-cipher-context.c (camel_cipher_clearsign): Removed unused method. svn path=/trunk/; revision=17297
* Check for NODATA too.Jeffrey Stedfast2002-06-271-0/+5
| | | | | | | | | 2002-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Check for NODATA too. svn path=/trunk/; revision=17295
* Include <sys/time.h> for struct timeval.Not Zed2002-06-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-06-26 Not Zed <NotZed@Ximian.com> * camel-gpg-context.c: Include <sys/time.h> for struct timeval. * providers/local/camel-local-provider.c (camel_provider_module_init): Removed spoold provider. The spool provider does it now. 2002-06-25 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-folder.c (camel_spool_folder_new): Support a new xstatus option - folders update/honour the Status/X-Status headers in addition to X-Evolution. * providers/local/camel-local-summary.c (camel_local_summary_write_headers): If supplied with an additional status or xstatus arg, write a Status header and/or X-Status. Also fix the case of properly terminating the headers if an xev line isn't supplied. * providers/local/Makefile.am (libcamellocalinclude_HEADERS,SOURCES): Removed spoold-store.[ch]. * providers/local/camel-local-provider.c (camel_provider_module_init): For the spoold type, just use the spool store instead. * providers/local/camel-spool-store.h: Added a type field, so the 1 store can implement different types without having to subclass. * providers/local/camel-spool-store.c (camel_spool_store_get_toplevel_dir): Removed, inherits from local store now. (construct): If we're pointing to a file, treat it as mbox mode, otherwise treat it as 'elm' mode. (get_folder): Only test for INBOX in mbox mode. (get_folder_info_elm): (get_folder_info_mbox): Two alternatives for getting folder info, depending on the type of folder we're looking at. (get_folder_info_mbox): Make the url include the protocol. (scan_dir): " * providers/local/camel-spoold-store.c (camel_spoold_store_get_toplevel_dir): Removed, inherits from local store now. * camel-folder.c (get_message_user_tag): Dont use a g_return_if_fail for info==NULL. This is not an error. (set_message_user_tag): And same here. (set_message_user_flag): Sigh, and here. (get_message_user_flag): And here. (set_message_flags): and here ... (get_message_flags): Dum de dum, de done at last. * providers/local/camel-mbox-folder.c (mbox_get_message): Check for new messages whenever we retrieve one. In the common no-update case, this is a single stat. (mbox_get_message): If we need to rescan, then force a full rescan to make sure it does the right thing. (mbox_get_message): Cleanup the exception handling a bit, if we do get an error, propagate any folder changes anyway as well. (mbox_set_message_user_flag): Argh more of these stupid g_returns taht shouldn't be. (mbox_set_message_user_tag): Here too. (mbox_set_message_flags): If the read flag is being changed, mark it as an xevchange (i.e. Status line change). * providers/local/camel-mbox-summary.c (summary_rebuild): Merged into summary_update. (summary_update): Changed to allow it to update existing lists of messages without clearing out the summary. (mbox_summary_check): Dont clear the summary, just re-scan. (message_info_new): Attempt to support the 'Status: RO' elm/pine thing. (camel_mbox_summary_encode_status): (camel_mbox_summary_decode_status): Util functions for creating/parsing the Status line. (camel_mbox_summary_sync_mbox): Write out the status line if we're going to try support it. (camel_mbox_summary_xstatus): Implement option to control read/write of (x-)status. (message_info_new): Do x-status stuff based on run-time option. (camel_mbox_summary_sync_mbox): " (mbox_summary_add): If x-status enabled, then always add status/x-status headers to message. * camel-folder-summary.c (summary_assign_uid): If the messageinfo is already in the summary, AND is the same messageinfo, dont do anything, return a value to indicate this. (camel_folder_summary_add): Do nothing if this info already in the summary, so we can perform updates. 2002-06-24 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-summary.c (camel_local_summary_check_force): New method to force the next summary check to be a full check, set if a mismatch occurs. * camel-folder-summary.c (camel_folder_summary_load): If we have no summary path set, dont do any i/o, rather than abort. (camel_folder_summary_save): " (camel_folder_summary_header_load): " * providers/local/camel-spool-store.h: Inherit from camel mbox store, even if we override almost everything. * providers/local/camel-local-folder.c (camel_local_folder_construct): If the base path points to a file, use that as the folder path as well. * providers/local/camel-spool-folder.h: Inherit from camel-mbox-folder. * providers/local/camel-spool-summary.c (spool_summary_sync_full): Use camel_mbox_summary_sync_mbox to do most of the work. * providers/local/camel-spool-summary.[ch]: Make spool-summary inherit from mbox summary rather than foldersummary. * providers/local/camel-mbox-summary.c (mbox_summary_sync): Make sync_full/quick virtual methods. (camel_mbox_summary_sync_mbox): The full sync method put into a simple function that sync's from fd to fd. (mbox_summary_sync_full): Use summary_sync_mbox to do the real work. (mbox_summary_check): Create removed events if the folder gets cleared. Also, dont clear the summary before a rebuild, try to merge. svn path=/trunk/; revision=17284
* #include <sys/time.h>Jeffrey Stedfast2002-06-261-0/+1
| | | | | | | | 2002-06-25 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c: #include <sys/time.h> svn path=/trunk/; revision=17283
* Return the option as --digest-algo=<micalg> (gpg_ctx_parse_status): DecodeJeffrey Stedfast2002-06-251-20/+70
| | | | | | | | | | | | | | | | 2002-06-25 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_hash_str): Return the option as --digest-algo=<micalg> (gpg_ctx_parse_status): Decode more status information and keep track of trust and such. (gpg_ctx_op_complete): Make sure we aren't waiting for gpg to write data to stdout (such as encrypted/decrypted data or a signature). (gpg_encrypt): Remove the fejj@stampede.org hard-coded value (which had only meant to be for testing). svn path=/trunk/; revision=17271
* implemented camel_gpg_context_set_always_trust()Jeffrey Stedfast2002-06-251-0/+18
| | | | svn path=/trunk/; revision=17269
* Use --command-fd rather than --passphrase-fd since what we really want isJeffrey Stedfast2002-06-251-1/+6
| | | | | | | | | | | | | 2002-06-24 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_argv): Use --command-fd rather than --passphrase-fd since what we really want is an interactive mode (besides, --passphrase-fd requires a passphrase to be sent before --status-fd will send a NEED_PASSPHRASE status message). (gpg_ctx_parse_status): When we encounter a BAD_PASSPHRASE, tell the session to uncache it. svn path=/trunk/; revision=17268
* Use --command-fd rather than --passphrase-fd since what we really want isJeffrey Stedfast2002-06-251-100/+69
| | | | | | | | | | | 2002-06-24 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_argv): Use --command-fd rather than --passphrase-fd since what we really want is an interactive mode (besides, --passphrase-fd requires a passphrase to be sent before --status-fd will send a NEED_PASSPHRASE status message). svn path=/trunk/; revision=17267
* Check for ERRSIG also. (gpg_ctx_op_step): Don't try writing a passphraseJeffrey Stedfast2002-06-241-6/+7
| | | | | | | | | | | 2002-06-23 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Check for ERRSIG also. (gpg_ctx_op_step): Don't try writing a passphrase unless our operation requires it. svn path=/trunk/; revision=17263
* Return -1 on error. (gpg_decrypt): Same. (gpg_sign): Again here.Jeffrey Stedfast2002-06-231-56/+105
| | | | | | | | | | | | | | | 2002-06-22 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_encrypt): Return -1 on error. (gpg_decrypt): Same. (gpg_sign): Again here. (gpg_ctx_op_step): Only attenmpt to read from the status-fd if we are not already 'complete'. * camel-pgp-mime.c (camel_pgp_mime_part_encrypt): Flush the filtered stream. svn path=/trunk/; revision=17257
* more fixes, now verifying works and signing almost works as well, except gpg ↵Jeffrey Stedfast2002-06-221-7/+30
| | | | | | is running out of memory for me? not sure if that is a gpg or evo bug svn path=/trunk/; revision=17256
* yay, I get to hold more state because Unix pipes suck so badly. This isJeffrey Stedfast2002-06-221-101/+220
| | | | | | | | getting very close to working now... I think that as soon as I debug this segfault, it will work. Probably dereferencing a NULL pointer or something stupid like that. svn path=/trunk/; revision=17255
* added camel_gpg_context_new which I had forgotten beforeJeffrey Stedfast2002-06-221-0/+28
| | | | svn path=/trunk/; revision=17252
* New source files implementing the CamelCipherContext class for gnupg.Jeffrey Stedfast2002-06-221-0/+1179
2002-06-21 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.[c,h]: New source files implementing the CamelCipherContext class for gnupg. * camel-pgp-context.c (camel_pgp_context_new): Return a CamelCipherContext. * camel-pgp-mime.c (camel_pgp_mime_part_decrypt): Take a CamelCipherContext argument rather than a CamelPgpContext since we now have a CamelGpgContext also. (camel_pgp_mime_part_encrypt): Same. (camel_pgp_mime_part_verify): Same. (camel_pgp_mime_part_sign): Same. svn path=/trunk/; revision=17251