aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-gpg-context.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't set seen_eof1 here anymore once we get a trust metric.Jeffrey Stedfast2003-04-231-16/+21
| | | | | | | | | | | | | | | 2003-04-21 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Don't set seen_eof1 here anymore once we get a trust metric. (gpg_ctx_new): Init seen_eof1 to TRUE here. (gpg_ctx_set_ostream): Change seen_eof1 to FALSE here this way we only ever have to set this if we are expecting output. (gpg_ctx_parse_status): Don't set seen_eof1 for importing either. (gpg_ctx_op_step): Only FD_SET() those fd's that we have not yet finished reading. svn path=/trunk/; revision=20922
* The gpg child process exiting does not necessarily mean that we've readyJeffrey Stedfast2003-04-171-6/+8
| | | | | | | | | | | | | | | | | | | | | | | 2003-04-15 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_verify): The gpg child process exiting does not necessarily mean that we've ready everything that we can from its pipes, so don't use gpg_ctx_op_exited() as a loop-exit condition. If for some reason the gpg child process does exit (due to an error), gpg_ctx_op_step() will eventually fail (as soon as it has finished reading any data in the pipes) and cause the loop to be terminated anyway. This fixes truncation of the gpg --verify stderr output that Evolution displays as the "validity report" (for lack of a better description). (gpg_ctx_op_step): Removed some debugging printf's (gpg_ctx_get_diagnostics): Use a bitfield to decide if we've already flushed the diagnostics stream, much simpler (plus we have plenty of bits to spare so might as well use them). (gpg_ctx_new): Fixed another logic bug which determined whether or not we should convert the gpg output from the locale charset into UTF-8. svn path=/trunk/; revision=20865
* Removed. I just realised that we ALWAYS want to get gpg's stderr in UTF-8,Jeffrey Stedfast2003-04-101-113/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-04-09 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): Removed. I just realised that we ALWAYS want to get gpg's stderr in UTF-8, so the better solution (plus less code duplication) is to just have the diagnostics buffer be a CamelStreamMem with a charset filter. (gpg_ctx_new): Setup a filter stream to convert our gpg stderr diagnostics into UTF-8 if needed. (gpg_ctx_free): Unref the diagnostcis stream. (gpg_ctx_parse_status): Flush the diagnostics stream if we are going to use the data in an exception. (gpg_ctx_op_step): Use camel_stream_write() to append to the diagnostics stream rather than appending the buffer to a GByteArray like we used to do. (gpg_ctx_op_step): Flush the diagnostics stream here too. (gpg_verify): Use a const char *diagnostics string here, forcing a slight rearrangement of calls - use the const char *dignostics before we gpg_ctx_free, otherwise we'll be passing free'd memory off to the cipher_validity. (gpg_ctx_get_diagnostics): Do the work here to flush the diagnostics stream and nul-terminate the buffer. Also return const now, instead of strdupping. No need for that. (gpg_ctx_parse_status): Convert the user hint to UTF-8. svn path=/trunk/; revision=20798
* Changed my mind a bit on how I wanted this to work. Instead of aborting onJeffrey Stedfast2003-04-101-29/+39
| | | | | | | | | | | | 2003-04-09 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): Changed my mind a bit on how I wanted this to work. Instead of aborting on an illegal sequence, do like we do with camel-mime-filter-charset and just skip over invalid sequences. Also, in the noop failure case, close the iconv_t so we don't leak it. svn path=/trunk/; revision=20796
* New function to get the UTF-8 version of the diagnostics (if the localeJeffrey Stedfast2003-04-101-3/+75
| | | | | | | | | | | | 2003-04-09 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_get_utf8_diagnostics): New function to get the UTF-8 version of the diagnostics (if the locale isn't already UTF-8 safe). (gpg_verify): Use the utf-8 diagnostics here. Also fixed a memleak in the exception case. svn path=/trunk/; revision=20792
* Disable debug printf'sJeffrey Stedfast2003-04-081-1/+1
| | | | | | | | 2003-04-07 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c: Disable debug printf's svn path=/trunk/; revision=20733
* remove unused var.Not Zed2003-03-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-03-28 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (get_folder): remove unused var. * providers/imap/camel-imap-utils.c (imap_parse_list_response): moved an unused var to the #if 0'd out block. * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): remove unused vars. * camel-index-control.c (main): deifne camel_init() before using it. * camel-vee-store.c (vee_get_folder): removed unused var. * camel-stream-mem.c (stream_write): warning -> fixme. * camel-stream-filter.c (_CamelStreamFilterPrivate): Add a ; to the end of the struct definition. * camel-store.c (camel_store_delete_folder): remove unused var. (camel_store_rename_folder): " (camel_store_unsubscribe_folder): " * camel-mime-part.c (write_to_stream): Changed warning into a TODO. (construct_from_parser): removed warning, the code was fixed. * camel-mime-message.c (construct_from_parser): Remove the warning, the code was fixed. * camel-mime-filter-enriched.c (camel_mime_filter_enriched_new): Remove unused var. * camel-medium.c (camel_medium_get_header): Removed warning, and changed docs to reflect it. * camel-gpg-context.c (gpg_ctx_parse_status): handle MODE_EXPORT as a noop (warning). * camel-folder.c (get_message_user_tag): changed a warning into a fixme (its not that important). (camel_folder_get_message_user_tag): " * camel-data-cache.c (data_cache_finalise): removed unused vars. (data_cache_expire): " svn path=/trunk/; revision=20556
* Same as the gpg and pkcs7 contexts.Jeffrey Stedfast2003-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-02-14 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c (smime_get_password): Same as the gpg and pkcs7 contexts. * camel-sasl-popb4smtp.c (popb4smtp_challenge): Updated for camel_session_get_password(). * camel-pkcs7-context.c (get_password): Same as the gpg code. * camel-gpg-context.c (gpg_ctx_parse_status): Updated for camel_session_get_password(). * providers/smtp/camel-smtp-transport.c (smtp_connect): No need to set USER_CANCEL exception here as it is done by camel_session_get_password(). Also updated for the new get_password() API change. * providers/imap/camel-imap-store.c (imap_auth_loop): Updated for camel_session_get_password() changes. We don't need to play the "bad passwd" game here too, do we? Bah, probably should but I don't feel like it for now. Maybe when we rewrite the IMAP provider. * camel-session.c (camel_session_get_password): Now takes a 'reprompt' argument that will force user-input to be given even if we have the passwd cached. * providers/pop3/camel-pop3-store.c (pop3_connect): Instead of uncaching the passwd after we receive a -ERR from the POP server, set 'reprompt' to TRUE to force user-input for the next password prompt (ie, make sure the front-end knows not to just return the cached value). The front-end can then decide to fill-in the user-input field with the last passwd that the user supplied. (pop3_try_authenticate): Now takes a reprompt argument which we pass into camel_session_get_password(). svn path=/trunk/; revision=19912
* Use g_strerror when setting an exception string (we need it to be inJeffrey Stedfast2002-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-11 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-spool-summary.c (spool_summary_sync_full): Use g_strerror when setting an exception string (we need it to be in UTF-8). (spool_summary_check): Here too. * providers/local/camel-spool-store.c (construct): Use g_strerror when setting an exception string (we need it to be in UTF-8). (get_folder): Same. (scan_dir): Here too. * providers/local/camel-spool-folder.c (spool_lock): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-mh-summary.c (mh_summary_check): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-mh-store.c (delete_folder): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-mbox-summary.c (summary_update): Use g_strerror when setting an exception string (we need it to be in UTF-8). (mbox_summary_sync_full): Here too. (mbox_summary_sync_quick): Same. (mbox_summary_sync): Also here. (camel_mbox_summary_sync_mbox): Again here. * providers/local/camel-mbox-folder.c (mbox_lock): Use g_strerror when setting an exception string (we need it to be in UTF-8). (mbox_append_message): Same. (mbox_get_message): Here too. * providers/local/camel-maildir-summary.c (maildir_summary_load): Use g_strerror when setting an exception string (we need it to be in UTF-8). (maildir_summary_check): Same. * providers/local/camel-maildir-store.c (get_folder): Use g_strerror when setting an exception string (we need it to be in UTF-8). (delete_folder): Same. (delete_folder): Here too. * providers/local/camel-local-summary.c (local_summary_sync): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/local/camel-local-store.c (get_folder): Use g_strerror when setting an exception string (we need it to be in UTF-8). (create_folder): Same. (xrename): Here too. (rename_folder): And here. (delete_folder): Also here. * camel-provider.c (camel_provider_init): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). * camel-movemail.c (camel_movemail): Use g_strerror when setting an exception string (we need it to be in UTF-8). (movemail_external): Same. (camel_movemail_copy_file): Here too. (camel_movemail_solaris): Also here. * camel-mime-utils.c (rfc2047_decode_word): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). (header_encode_param): Same. * camel-mime-part-utils.c (convert_buffer): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). * camel-lock-client.c (camel_lock_helper_init): Use g_strerror when setting an exception string (we need it to be in UTF-8). * camel-data-cache.c (camel_data_cache_remove): Use g_strerror when setting an exception string (we need it to be in UTF-8). * camel-tcp-stream-raw.c (flaky_tcp_write): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). (flaky_tcp_read): Same. * camel-gpg-context.c (gpg_ctx_op_step): For debugging printfs, we want to use normal strerror (we want locale charset, not UTF-8). * camel-service.c (camel_gethostbyname): Use g_strerror when setting an exception string (we need it to be in UTF-8). * camel-lock.c (camel_lock_dot): Use g_strerror when setting an exception string (we need it to be in UTF-8). (camel_lock_fcntl): Same. svn path=/trunk/; revision=18689
* Set the virtual method pointers to the import/export methods.Jeffrey Stedfast2002-11-011-15/+149
| | | | | | | | | | | | | | | | | | | | | | 2002-10-31 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (camel_gpg_context_class_init): Set the virtual method pointers to the import/export methods. (camel_gpg_context_init): Set the key_protocol string. (gpg_hash_to_id): Handle 2 more hash types. (gpg_id_to_hash): Same. (gpg_ctx_op_step): Slight fixes to support import/export. (gpg_ctx_parse_status): Fix to hack around the fact that importing keys doesn't write to stdout. (gpg_import_keys): Implemented. (gpg_export_keys): Implemented. * camel-cipher-context.c (camel_cipher_context_class_init): Hook up default virtual methods for import/export. (camel_cipher_import_keys): Implemented. (camel_cipher_export_keys): Implemented. svn path=/trunk/; revision=18475
* Don't prematurely set gpg->complete to TRUE. Let gpg_ctx_op_step () set itJeffrey Stedfast2002-10-281-9/+4
| | | | | | | | | | 2002-10-25 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_ctx_parse_status): Don't prematurely set gpg->complete to TRUE. Let gpg_ctx_op_step () set it to TRUE when gpg closes the status-fd instead. svn path=/trunk/; revision=18448
* No longer takes a path argument. (camel_gpg_context_fianlise): No need toJeffrey Stedfast2002-10-171-29/+8
| | | | | | | | | | | | | | | | | | | | 2002-10-16 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (camel_gpg_context_new): No longer takes a path argument. (camel_gpg_context_fianlise): No need to free ctx->path. (gpg_ctx_new): No longer takes a path argument either. (gpg_ctx_free): No need to free ctx->path, it's no longer used. (gpg_ctx_op_start): Don't stat the path anymore and change the first arg to execvp to "gpg" so that we use the shell's environment to find gpg. (gpg_sign): Updated. (gpg_verify): Updated. (gpg_encrypt): Updated. (gpg_decrypt): Updated. (gpg_ctx_get_argv): Removed some debug printfs. svn path=/trunk/; revision=18383
* If the hash id is NULL, return CAMEL_CIPHER_HASH_DEFAULT. Fixes bugJeffrey Stedfast2002-10-161-8/+10
| | | | | | | | | 2002-10-15 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_id_to_hash): If the hash id is NULL, return CAMEL_CIPHER_HASH_DEFAULT. Fixes bug #32229. svn path=/trunk/; revision=18371
* If the diagnostics are empty, just explain that gpg failed to execute.Jeffrey Stedfast2002-08-201-6/+20
| | | | | | | | | | | 2002-08-19 Jeffrey Stedfast <fejj@ximian.com> * camel-gpg-context.c (gpg_sign): If the diagnostics are empty, just explain that gpg failed to execute. (gpg_encrypt): Same. (gpg_decrypt): And here too. svn path=/trunk/; revision=17807
* 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