Marcus Brinkmann [Thu, 25 Jul 2002 18:20:23 +0000 (18:20 +0000)]
Update version information.
Marcus Brinkmann [Thu, 25 Jul 2002 18:15:52 +0000 (18:15 +0000)]
Update version requirement.
Marcus Brinkmann [Thu, 25 Jul 2002 18:15:11 +0000 (18:15 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-encrypt-sym.c (main): Change type of I to size_t and
rename to LEN.
* gpg/t-verify.c (main): Likewise. Submitted by St�phane
Corth�sy.
Marcus Brinkmann [Thu, 25 Jul 2002 17:51:42 +0000 (17:51 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (libgpgme_la_LDADD): Add @LIBOBJS@ for vasprintf and
fopencookie.
* vasprintf.c: Update to more recent libiberty version.
* debug.h: Replace #elsif with #elif.
Submitted by St�phane Corth�sy:
* util.h (vasprintf): Correct prototype.
* encrypt-sign.c: Include <stddef.h>.
(encrypt_sign_status_handler): Change type of ENCRYPT_INFO_LEN to
size_t.
* ath-pthread.c: Include <stdlib.h>, not <malloc.h>.
* ath-pth.c: Likewise.
Marcus Brinkmann [Thu, 25 Jul 2002 16:08:14 +0000 (16:08 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (_gpgme_gpg_new): Always set utf8 as charset.
Marcus Brinkmann [Thu, 25 Jul 2002 16:01:55 +0000 (16:01 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* key.c (gpgme_key_get_as_xml): Add OTRUST attribute. Requested
by St�phane Corth�sy.
(gpgme_key_get_string_attr): Add GPGME_ATTR_SIG_SUMMARY case to
silence gcc warning.
Marcus Brinkmann [Thu, 25 Jul 2002 15:52:23 +0000 (15:52 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Manipulating Data Buffers): Mention that backend
tries to detect encoding automatically.
Marcus Brinkmann [Thu, 25 Jul 2002 15:50:46 +0000 (15:50 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Information About Keys): Document (badly) the new
key attributes.
Marcus Brinkmann [Thu, 25 Jul 2002 15:45:40 +0000 (15:45 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (_gpgme_gpg_op_keylist_ext): Skip empty string
patterns. Reported by St�phane Corth�sy.
Marcus Brinkmann [Thu, 25 Jul 2002 15:33:03 +0000 (15:33 +0000)]
2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* wait.c (fdt_global): Make static. Reported by St�phane
Corth�sy.
Karl-Heinz Zimmer [Thu, 4 Jul 2002 00:02:19 +0000 (00:02 +0000)]
CRASH prevention fix: Memory was overwritten if there were more than 1 email address in a signature certificate found in checkMessageSignature() function.
Karl-Heinz Zimmer [Wed, 3 Jul 2002 15:43:41 +0000 (15:43 +0000)]
fixing bug #1154
Werner Koch [Wed, 3 Jul 2002 11:04:54 +0000 (11:04 +0000)]
* gpgmeplug.c (nextCertificate): Actually free the entire array
and don't loop over tmp_dn and double free the first item.
Spotted by Bernhard Herzog.
Marcus Brinkmann [Wed, 3 Jul 2002 02:22:38 +0000 (02:22 +0000)]
2002-07-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Run Control): Update this section.
(Waiting For Completion): Likewise for this subsection.
(Cancelling an Operation): Likewise for this subsection.
(Using External Event Loops): New subsection with several
subsubsections.
Marcus Brinkmann [Wed, 3 Jul 2002 02:18:43 +0000 (02:18 +0000)]
2002-07-03 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-eventloop.c: New file.
* gpg/Makefile (TESTS): Add t-eventloop.
Marcus Brinkmann [Wed, 3 Jul 2002 01:57:03 +0000 (01:57 +0000)]
2002-07-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.c (gpgme_set_io_cbs): Deal with CTX being NULL.
* gpgme.c (_gpgme_op_event_cb_user): New function.
* op-support.c (_gpgme_op_reset): Support a new mode of operation
for private or user event loop. Use new user event callback
wrapper.
* trustlist.c (gpgme_op_trustlist_start): Use this new mode.
* keylist.c (gpgme_op_keylist_start): Likewise.
* rungpg.c (_gpgme_gpg_io_event): New function.
* rungpg.h (_gpgme_gpg_io_event): New prototype.
* engine-gpgsm.c (_gpgme_gpg_io_event): New function.
* engine-gpgsm.h (_gpgme_gpgsm_io_event): New prototype.
* engine.c (_gpgme_engine_io_event): New function.
* engine.h (_gpgme_engine_io_event): New prototype.
* keylist.c (finish_key): Call _gpgme_engine_io_event, and move
the real work for the default IO callback routines to ...
(_gpgme_op_keylist_event_cb): ... here. New function.
* trustlist.c (trustlist_colon_handler): Signal
GPGME_EVENT_NEXT_TRUSTITEM. Move queue manipulation to ...
(_gpgme_op_trustlist_event_cb): ... here. New function.
* gpgme.c (_gpgme_op_event_cb): Call _gpgme_op_keylist_event_cb
and _gpgme_op_trustlist_event_cb when appropriate.
* ops.h (_gpgme_op_keylist_event_cb): New prototype.
(_gpgme_op_trustlist_event_cb): Likewise.
* op-support.c (_gpgme_op_reset): Add comment why we don't use the
user provided event handler directly.
* gpgme.h (GpgmeRegisterIOCb): Return GpgmeError value, and TAG in
a pointer argument.
* wait.c (_gpgme_add_io_cb): Likewise.
* wait.h (_gpgme_add_io_cb): Likewise for prototype.
* rungpg.c (_gpgme_gpg_add_io_cb): Call IO_CBS->add with new
argument. Fix up error handling.
* engine-gpgsm.c (_gpgme_gpgsm_add_io_cb): Call IO_CBS->add with
new argument, fix up error handling.
Marcus Brinkmann [Tue, 2 Jul 2002 20:43:25 +0000 (20:43 +0000)]
Fix news item.
Karl-Heinz Zimmer [Tue, 2 Jul 2002 16:32:29 +0000 (16:32 +0000)]
make sure key used for signing _can_ sign
Werner Koch [Tue, 2 Jul 2002 09:08:21 +0000 (09:08 +0000)]
* configure.ac: Bumbed version number to 0.3.9; add a comment on
when to change it.
* gpgme.spec.in: New. Contributed by Wojciech Polak.
* Makefile.am (dist-hook): New.
* AUTHORS: Added Wojciech and bug reporting addresses.
Werner Koch [Tue, 2 Jul 2002 09:07:52 +0000 (09:07 +0000)]
auto updated version number.
Werner Koch [Tue, 2 Jul 2002 08:53:31 +0000 (08:53 +0000)]
typo fix in comment.
Werner Koch [Mon, 1 Jul 2002 13:09:18 +0000 (13:09 +0000)]
(xstrdup): Oops, obviously I calculated the length wrong when
coded this. Tsss, wrote xstrdup some hundreds times but missed it
this time. Thanks to Steffen Hansen for noticing it.
Werner Koch [Mon, 1 Jul 2002 13:01:51 +0000 (13:01 +0000)]
* gpgmeplug.c (findCertificates): Reintroduced a free which must
have been removed after my last fix. This avoids a memory leak
when a fingerprint was not found. Removed the double loop
increment in the code to release the arrays.
(make_fingerprint): Removed superfluous check on retrun value of
xmalloc.
(safe_free): Removed. Changed all callers to use a regular free
and at appropriate palces set the free pointer to NULL. That
safe_free stuff seems to have been copied verbatim from some
Mutt example code I posted.
(storeNewCharPtr): Use xmalloc instead of an unchecked
malloc. Removed superfluous string termination.
(parseAddress): Use xmalloc instead of an unchecked malloc.
(nextAddress): Ditto.
* gpgmeplug.c: Moved a few helper functions more to the top.
Fixed comment syntax. Merged a copyright notice somewhere in the
middle of the file with the one at the top.
Steffen Hansen [Mon, 1 Jul 2002 12:52:29 +0000 (12:52 +0000)]
Fixed memory corruption bug
Karl-Heinz Zimmer [Mon, 1 Jul 2002 12:08:24 +0000 (12:08 +0000)]
avoid another memory leak in checkMessageSignature()
Werner Koch [Mon, 1 Jul 2002 11:36:48 +0000 (11:36 +0000)]
* gpgmeplug.c (findCertificates): Reintroduced a free which must
have been removed after my last fix. This avoids a memory leak
when a fingerprint was not found. Removed the double loop
increment in the code to release the arrays.
Karl-Heinz Zimmer [Fri, 28 Jun 2002 19:50:31 +0000 (19:50 +0000)]
replace many comment lines by just one single comment
Karl-Heinz Zimmer [Fri, 28 Jun 2002 19:40:13 +0000 (19:40 +0000)]
Make it compile. :-(
Karl-Heinz Zimmer [Fri, 28 Jun 2002 19:37:06 +0000 (19:37 +0000)]
Removed silly "free( dn )" statement forgotten during my last changes in findCertificates().
Werner Koch [Fri, 28 Jun 2002 18:30:23 +0000 (18:30 +0000)]
* gpgmeplug.c (xmalloc): New.
(safe_malloc): Removed this macro and replaced it at all places
without return values checks by xmalloc.
(xstrdup): New. Replaces funny named macro with different
semantics. Changed all callers to the new semantic.
(findCertificates): Don't free duplicate free the FPR array
values. Removed the unneeded initialization. Replaces the
gcc-ish use dynamic allocation of automatic variables by repalce
maxCerts with a macro MAXCERTS. Made some comments Real C (tm).
(startListCertificates): Removed uneeded cast from xmalloc.
Bernhard Reiter [Fri, 28 Jun 2002 14:51:12 +0000 (14:51 +0000)]
* gpgmeplug.c: new macro days_to_seconds().
this also fixes the dividing factor.
(signatureCertificateDaysLeftToExpiry)
(preceiverCertificateDaysLeftToExpiry): using the new macro
(caCertificateDaysLeftToExpiry)
(rootCertificateDaysLeftToExpiry): using new macro in deactivated code.
Karl-Heinz Zimmer [Fri, 28 Jun 2002 14:12:18 +0000 (14:12 +0000)]
internal AEgypten bugfix #1131: get full list of emails stored in certificated used for signing a received message
Marcus Brinkmann [Fri, 28 Jun 2002 12:02:43 +0000 (12:02 +0000)]
2002-06-28 Marcus Brinkmann <marcus@g10code.de>
* keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
table (eg use synchronous mode).
Marcus Brinkmann [Fri, 28 Jun 2002 01:14:41 +0000 (01:14 +0000)]
2002-06-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Remove item about the need to
synchronize anything against gpgme_wait (except gpgme_wait
itself).
Marcus Brinkmann [Fri, 28 Jun 2002 01:11:20 +0000 (01:11 +0000)]
2002-06-28 Marcus Brinkmann <marcus@g10code.de>
* ops.h (_gpgme_wait_on_condition): Remove HANG argument from
prototype and change return type to GpgmeError.
(_gpgme_wait_one): New prototype.
* wait.c (gpgme_wait): Replace with the meat from
_gpgme_wait_on_condition here, and remove the support for
conditions.
(_gpgme_wait_on_condition): Remove HANG argument from prototype
and change return type to GpgmeError. Replace with meat from
_gpgme_wait_one and add support for conditions.
(_gpgme_wait_one): Just call _gpgme_wait_on_condition without
condition.
* keylist.c (gpgme_op_keylist_ext_start): Always use our own FD
table (eg use synchronous mode).
(gpgme_op_keylist_next): Remove HANG argument from
_gpgme_wait_on_condition. Check its return value.
* trustlist.c (gpgme_op_trustlist_start): Always use our own FD
table (eg use synchronous mode).
(gpgme_op_trustlist_next): Remove HANG argument from
_gpgme_wait_on_condition. Check its return value.
Marcus Brinkmann [Thu, 27 Jun 2002 16:34:10 +0000 (16:34 +0000)]
doc/
2002-06-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Information About Keys): Fix documentation for IDX.
(Information About Trust Items): Likewise.
gpgme/
2002-06-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h: Fix documentation of key attribute retrieval functions.
Steffen Hansen [Thu, 27 Jun 2002 16:26:15 +0000 (16:26 +0000)]
use gpgme_op_keylist_ext_start
Steffen Hansen [Thu, 27 Jun 2002 13:15:02 +0000 (13:15 +0000)]
handle truncated data
Karl-Heinz Zimmer [Thu, 27 Jun 2002 08:21:58 +0000 (08:21 +0000)]
Missing implementation bug fixed: Return both error id and error plain text from decryptMessage().
Karl-Heinz Zimmer [Wed, 26 Jun 2002 15:16:32 +0000 (15:16 +0000)]
Bugfix: enable function receiverCertificateDaysLeftToExpiry().
Werner Koch [Wed, 26 Jun 2002 12:49:59 +0000 (12:49 +0000)]
* gpgsm/t-import.c (print_op_info): New.
(main): Print operation info.
* engine-gpgsm.c (map_assuan_error): Map No_Data_Available to EOF.
* import.c (append_xml_impinfo): Kludge to print fingerprint
instead of keyid for use with gpgsm.
(import_status_handler): Set a flag to know whether any import
occured.
(gpgme_op_import): Reurn -1 if no certificate ewas imported.
* gpgme.texi (Importing Keys): Document the return value -1 of
gpgme_op_import.
Karl-Heinz Zimmer [Wed, 26 Jun 2002 08:04:43 +0000 (08:04 +0000)]
Make the signatureCertificateDaysLeftToExpiry() work as expected.
Karl-Heinz Zimmer [Wed, 26 Jun 2002 04:44:58 +0000 (04:44 +0000)]
IMPORTANT BUGFIX: Avoid random crashes in findCertificates. (This also fixes bug #1088.)
Karl-Heinz Zimmer [Wed, 26 Jun 2002 00:05:30 +0000 (00:05 +0000)]
Oh pazzo mio! I forgot to *use* the nice dn string actually.
Steffen Hansen [Tue, 25 Jun 2002 20:24:29 +0000 (20:24 +0000)]
cert export/import bugfix
Werner Koch [Tue, 25 Jun 2002 19:22:12 +0000 (19:22 +0000)]
Prepared for further development.
Werner Koch [Tue, 25 Jun 2002 19:04:40 +0000 (19:04 +0000)]
* gpgsm/Makefile.am (DISTCLEANFILES): new.
Werner Koch [Tue, 25 Jun 2002 18:50:23 +0000 (18:50 +0000)]
* engine-gpgsm.c (_gpgme_gpgsm_set_io_cbs) [ENABLE_GPGSM]: Fixed
function arguments.
Werner Koch [Tue, 25 Jun 2002 18:32:20 +0000 (18:32 +0000)]
* configure.ac: Bumbed LT version to 9/3/0.
(NEED_GPGSM_VERSION): Need 0.3.8 due to fixed export command.
Steffen Hansen [Tue, 25 Jun 2002 17:42:21 +0000 (17:42 +0000)]
importCertificate( const char* fpr )
Karl-Heinz Zimmer [Tue, 25 Jun 2002 15:05:59 +0000 (15:05 +0000)]
Have additional secretOnly parameter at the findCertificates() function to allow for searching only secret keys.
Marcus Brinkmann [Tue, 25 Jun 2002 12:12:25 +0000 (12:12 +0000)]
2002-06-25 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (TESTS): Add t-export.
gpgsm/t-export.c: New file.
Marcus Brinkmann [Tue, 25 Jun 2002 12:10:27 +0000 (12:10 +0000)]
2002-06-25 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_export): Only export the keys
listed in RECP.
* export.c (gpgme_op_export): If no data was returned, return
GPGME_No_Recipients.
Marcus Brinkmann [Tue, 25 Jun 2002 11:14:44 +0000 (11:14 +0000)]
2002-06-25 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_export): Implement.
Karl-Heinz Zimmer [Mon, 24 Jun 2002 21:01:18 +0000 (21:01 +0000)]
Disable debug output
Karl-Heinz Zimmer [Mon, 24 Jun 2002 20:25:19 +0000 (20:25 +0000)]
Use fine DN parts reordering from within findCertificates() as well.
Marcus Brinkmann [Fri, 21 Jun 2002 19:16:16 +0000 (19:16 +0000)]
2002-06-21 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (gpgsm_assuan_simple_command): Return ERR.
(parse_status): New function.
(gpgsm_status_handler): Use parse_status.
(gpgsm_assuan_simple_command): Accept new arguments STATUS_FNC and
STATUS_FNC_VALUE and process status messages.
(gpgsm_set_recipients): Pass new arugments to gpgsm_assuan_simple_command.
(gpgsm_set_fd): Likewise.
(_gpgme_gpgsm_op_keylist): Likewise.
(_gpgme_gpgsm_op_keylist_ext): Likewise.
(_gpgme_gpgsm_op_sign): Likewise.
Marcus Brinkmann [Fri, 21 Jun 2002 15:28:56 +0000 (15:28 +0000)]
2002-06-21 Marcus Brinkmann <marcus@g10code.de>
* wait.c (_gpgme_remove_io_cb): Unlock FDT->lock.
Werner Koch [Thu, 20 Jun 2002 16:48:37 +0000 (16:48 +0000)]
* gpgmeplug.c (reorder_dn): Added missing stdpart list terminator.
BTW, why did you change the sequence of the parts. According to the
specs there is no standard but our implementation has to make sure
that it uses the same sequence everywhere. Adding the extra parts is
useless because they are not defined in rfc2253 and thus can't occur.
Werner Koch [Thu, 20 Jun 2002 13:47:24 +0000 (13:47 +0000)]
* gpgsm/t-sign.c (main): Also test a normal signature.
* gpg/Makefile (TESTS_ENVIRONMENT): Set GPG_AGENT_INFO empty.
* gpg/t-signers.c, gpg/t-sign.c, gpg/t-encrypt-sym.c
* gpg/t-encrypt-sign.c, gpg/t-decrypt.c
* gpg/t-decrypt-verify.c (main): Changed the GPG_AGENT_INFO check to
match the one in ../../gpgme/rungpg.c.
Werner Koch [Thu, 20 Jun 2002 13:45:50 +0000 (13:45 +0000)]
* rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty.
Werner Koch [Thu, 20 Jun 2002 12:13:44 +0000 (12:13 +0000)]
* verify.c (calc_sig_summary): Set bad policy for wrong key usage.
(skip_token): New.
(_gpgme_verify_status_handler): Watch out for wrong key usage.
(gpgme_get_sig_string_attr): Hack to return info on the key
usage. Does now make use of the former RESERVED argument which
has been renamed to WHATIDX.
(gpgme_get_sig_ulong_attr): Renamed RESERVED to WHATIDX.
* gpgme.texi (Verify): Explain the new whatidx variable.
Karl-Heinz Zimmer [Thu, 20 Jun 2002 05:05:43 +0000 (05:05 +0000)]
added some entries to DN normalization function
Steffen Hansen [Thu, 20 Jun 2002 00:44:00 +0000 (00:44 +0000)]
Show DN part names (CN=blah,O=blah...)
Karl-Heinz Zimmer [Wed, 19 Jun 2002 12:56:43 +0000 (12:56 +0000)]
Bugfix #949: (a) call gpgme_check_version(NULL) during initialization and (b) provide additional function libVersion(void) to retrieve the library version used - this function has been added to the CryptPlug API as new *MUST* function for all implementations.
Karl-Heinz Zimmer [Wed, 19 Jun 2002 10:22:49 +0000 (10:22 +0000)]
Use gpgme_get_sig_ulong_attr(.., GPGME_ATTR_SIG_SUMMARY ) function to return extended signature status information from the CryptPlug to the calling process after trying to verify a signature.
Marcus Brinkmann [Fri, 14 Jun 2002 20:06:35 +0000 (20:06 +0000)]
2002-06-14 Marcus Brinkmann <marcus@g10code.de>
* wait.c (do_select): Return -1 on error, and 0 if nothing to run.
(_gpgme_wait_one): Only set HANG to zero if do_select returned an
error, or there are no more file descriptors to wait on.
(_gpgme_wait_on_condition): Ignore return value from do_select for
now.
Marcus Brinkmann [Fri, 14 Jun 2002 20:05:26 +0000 (20:05 +0000)]
Cosmetic fix.
Marcus Brinkmann [Fri, 14 Jun 2002 19:41:43 +0000 (19:41 +0000)]
Update list.
Marcus Brinkmann [Fri, 14 Jun 2002 19:40:55 +0000 (19:40 +0000)]
Add items about I/O callbacks.
Werner Koch [Thu, 13 Jun 2002 08:45:32 +0000 (08:45 +0000)]
* verify.c (gpgme_op_verify): Make sure that we never access an
unitialized result structure.
Steffen Hansen [Thu, 13 Jun 2002 01:56:31 +0000 (01:56 +0000)]
bugfix + change to the nextCertificate() function prototype
Werner Koch [Wed, 12 Jun 2002 14:34:15 +0000 (14:34 +0000)]
tests/
* gpgsm/t-keylist.c (doit): Print operation info if available.
gpgme/
* keylist.c (struct keylist_result_s): New.
(_gpgme_release_keylist_result): Release it here
(keylist_status_handler): Handle truncated.
(append_xml_keylistinfo): New.
* gpgme.c (_gpgme_release_result): and use it here.
* types.h: Declare the new type here.
* context.h (struct gpgme_context_s): Use it here.
Karl-Heinz Zimmer [Wed, 12 Jun 2002 11:05:42 +0000 (11:05 +0000)]
Add Plugin configuration option to allow for sending of *opaque* signed messages. Unfortunately this is necessary for communication with some MS Outlook clients, e.g. TrustedMime is not able to understand Multipart/Signed messages. <sigh> NOTE: This breaks compabilitity with kdenetwork, so make sure to update the KDE sources as well...
Marcus Brinkmann [Tue, 11 Jun 2002 18:12:19 +0000 (18:12 +0000)]
2002-06-11 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_release): Close status_cb.fd.
(_gpgme_gpgsm_new): Duplicate status file descriptor, so we can
use our own close notification mechanism without interfering with
assuan.
Werner Koch [Tue, 11 Jun 2002 15:33:08 +0000 (15:33 +0000)]
* gpgme.h: Add GPGME_ATTR_SIG_SUMMARY and the GPGME_SIGSUM_
constants.
* verify.c (calc_sig_summary): New.
(gpgme_get_sig_ulong_attr): And use it here.
Steffen Hansen [Mon, 10 Jun 2002 18:37:11 +0000 (18:37 +0000)]
support for listing of external certs (untested)
Steffen Hansen [Mon, 10 Jun 2002 17:53:04 +0000 (17:53 +0000)]
reorder issuer DN also
Steffen Hansen [Mon, 10 Jun 2002 16:36:38 +0000 (16:36 +0000)]
typecast to make khz happy
Marcus Brinkmann [Mon, 10 Jun 2002 14:13:55 +0000 (14:13 +0000)]
2002-06-10 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_start): Move the code that sets the
close notification for the status fd to ...
(_gpgme_gpgsm_new): ... here.
* wait.h: Include "sema.h". Remove prototypes of
_gpgme_remove_proc_from_wait_queue and
_gpgme_register_pipe_handler. Add prototypes of
_gpgme_fd_table_init, _gpgme_fd_table_deinit, _gpgme_fd_table_put,
_gpgme_add_io_cb, _gpgme_remove_io_cb, _gpgme_wait_event_cb and
_gpgme_wait_one..
* wait.c: Remove global variables PROC_QUEUE, PROC_QUEUE_LOCK,
FD_TABLE_SIZE, FD_TABLE, FD_TABLE_LOCK. New global variables
FDT_GLOBAL, CTX_DONE_LIST, CTX_DONE_LIST_SIZE,
CTX_DONE_LIST_LENGTH and CTX_DONE_LIST_LOCK. Remove struct
proc_s. Replace struct wait_item_s.
(_gpgme_fd_table_init): New function.
(_gpgme_fd_table_deinit): Likewise.
(_gpgme_fd_table_put): Likewise.
(set_process_done): Remove function.
(do_select): Take argument FDT. Use that to decide which fds to
select on.
(_gpgme_remove_proc_from_wait_queue): Remove function.
(_gpgme_wait_event_cb): New function.
(_gpgme_wait_one): Likewise.
(_gpgme_register_pipe_hanldler): Remove function.
(_gpgme_add_io_cb): New function.
(_gpgme_remove_io_cb): Likewise.
(_gpgme_freeze_fd): Remove function.
(_gpgme_thaw_fd): Remove function.
* rungpg.c (struct fd_data_map_s): Add new member TAG.
(struct gpg_object_s): Likewise for STATUS and COLON. Add member
IDX to CMD. Add new member IO_CBS.
(close_notify_handler): New variables POSSIBLY_DONE and NOT_DONE.
For each I/O callback, check if it should be unregistered. If all
callbacks have been unregistered, trigger GPGME_EVENT_DONE.
Remove member RUNNING.
(_gpgme_gpg_new): Initialize new members.
(_gpgme_gpg_release): Check PID not RUNNING. Don't call
_gpgme_remove_proc_from_wait_queue. Close GPG->CMD.FD if set.
(build_argv): Store away the index instead the file descriptor for
CMD.
(_gpgme_gpg_add_io_cb): New function.
(_gpgme_gpg_spawn): Use _gpgme_gpg_add_io_cb to register IO
callbacks.
(gpg_status_handler): Change return type to void, remove PID
argument, close filedescriptor if EOF or error occurs.
(read_status): Use _gpgme_gpg_add_io_cb instead _gpgme_thaw_fd.
Use IO_CBS->remove instead _gpgme_freeze_fd.
(gpg_colon_line_handler): Change return type to void, remove PID
argument, close filedescriptor if EOF or error occurs.
(command_cb): Use IO_CBS->remove instead _gpgme_freeze_fd.
(_gpgme_gpg_set_io_cbs): New function.
* rungpg.h (_gpgme_gpg_set_io_cbs): Prototype for
_gpgme_gpg_set_io_cbs.
* gpgme.h (GpgmeIOCb): New type.
(GpgmeRegisterIOCb): Likewise.
(GpgmeRemoveIOCb): Likewise.
(GpgmeEventIO): Likewise.
(GpgmeEventIOCb): Likewise.
(struct GpgmeIOCbs): New structure to hold I/O callbacks.
(gpgme_set_op_io_cbs): New prototype.
(gpgme_get_op_io_cbs): Likewise.
* ops.h: New prototype for _gpgme_op_event_cb. Remove prototypes
for _gpgme_freeze_fd and _gpgme_thaw_fd. Remove PID argument from
_gpgme_data_inbound_handler and _gpgme_data_outbound_handler
prototype. Add prototype for _gpgme_op_reset.
Add synchronous argument to _gpgme_decrypt_start prototype.
* io.h: Beautification.
* gpgme.c: Include "wait.h".
(gpgme_new): Initialize FDT.
(gpgme_set_io_cbs): New function.
(gpgme_get_io_cbs): Likewise.
(_gpgme_op_event_cb): Likewise.
* data.c (_gpgme_data_inbound_handler): Change return type to
void. Drop PID argument. Close FD on error and EOF.
(write_mem_data): Don't close FD here ...
(write_cb_data): ... or here ...
(_gpgme_data_outbound_handler): ... but here. Change return type
to void. Drop PID argument.
* context.h: Include "wait.h".
(struct gpgme_context_s): New members FDT and IO_CBS.
* op-support.c: New file.
* Makefile.am (libgpgme_la_SOURCES): Add op-support.c.
* ops.h: Add prototype for _gpgme_op_reset().
* decrypt.c (_gpgme_decrypt_start): New argument SYNCHRONOUS. Use
_gpgme_op_reset.
(gpgme_op_decrypt_start): Add synchronous argument.
(gpgme_op_decrypt): Likewise. Use _gpgme_wait_one instead
gpgme_wait.
* delete.c (gpgme_op_delete_start): Rename to ...
(_gpgme_op_delete_start): ... this. New argument SYNCHRONOUS.
Use _gpgme_op_reset. Make function static.
(gpgme_op_delete_start): Just a wrapper around
_gpgme_op_delete_start now.
(gpgme_op_delete): Add synchronous argument. Use _gpgme_wait_one
instead gpgme_wait.
* encrypt.c: Include "wait.h".
(ggpgme_op_encrypt_start): Rename to ...
(_gpgme_op_encrypt_start): ... this. New argument SYNCHRONOUS.
Use _gpgme_op_reset. Make function static.
(gpgme_op_encrypt_start): Just a wrapper around
_gpgme_op_encrypt_start now.
(gpgme_op_encrypt): Add synchronous argument. Use _gpgme_wait_one
instead gpgme_wait.
* encrypt_sign.c (gpgme_op_encrypt_sign_start): Rename to ...
(_gpgme_op_encrypt_sign_start): ... this. New argument
SYNCHRONOUS. Use _gpgme_op_reset. Make function static.
(gpgme_op_encrypt_sign_start): Just a wrapper around
_gpgme_op_encrypt_sign_start now.
(gpgme_op_encrypt_sign): Add synchronous argument. Use
_gpgme_wait_one instead gpgme_wait.
* export.c (gpgme_op_export_start): Rename to ...
(_gpgme_op_export_start): ... this. New argument SYNCHRONOUS.
Use _gpgme_op_reset. Make function static.
(gpgme_op_export_start): Just a wrapper around
_gpgme_op_export_start now.
(gpgme_op_export): Add synchronous argument. Use _gpgme_wait_one
instead gpgme_wait.
* genkey.c (gpgme_op_genkey_start): Rename to ...
(_gpgme_op_genkey_start): ... this. New argument SYNCHRONOUS.
Use _gpgme_op_reset. Make function static.
(gpgme_op_genkey_start): Just a wrapper around
_gpgme_op_genkey_start now.
(gpgme_op_genkey): Add synchronous argument. Use _gpgme_wait_one
instead gpgme_wait.
* import.c (gpgme_op_import_start): Rename to ...
(_gpgme_op_import_start): ... this. New argument SYNCHRONOUS.
Use _gpgme_op_reset. Make function static.
(gpgme_op_import_start): Just a wrapper around
_gpgme_op_import_start now.
(gpgme_op_import): Add synchronous argument. Use _gpgme_wait_one
instead gpgme_wait.
* keylist.c (gpgme_op_keylist_start): Use _gpgme_op_reset.
(gpgme_op_keylist_ext_start): Likewise.
* sign.c (gpgme_op_sign_start): Rename to ...
(_gpgme_op_sign_start): ... this. New argument SYNCHRONOUS. Use
_gpgme_op_reset. Make function static.
(gpgme_op_sign_start): Just a wrapper around _gpgme_op_sign_start
now.
(gpgme_op_sign): Add synchronous argument. Use _gpgme_wait_one
instead gpgme_wait.
* trustlist.c (gpgme_op_trustlist_start): Use _gpgme_op_reset.
* verify.c (gpgme_op_verify_start): Rename to ...
(_gpgme_op_verify_start): ... this. New argument SYNCHRONOUS.
Use _gpgme_op_reset. Make function static.
(gpgme_op_verify_start): Just a wrapper around
_gpgme_op_verify_start now.
(gpgme_op_verify): Add synchronous argument. Use _gpgme_wait_one
instead gpgme_wait.
* engine-gpgsm.c (iocb_data_t): New type.
(struct gpgsm_object_s): New member status_cb. Replace input_fd
and input_data with input_cb. Replace output_fd and output_data
with output_cb. Replace message_fd and message_data with
message_cb. New member io_cbs.
(_gpgme_gpgsm_new): Initialize all new members (and drop the old
ones).
(close_notify_handler): New variable POSSIBLY_DONE. For each I/O
callback, check if it should be unregistered. If all callbacks
have been unregistered, trigger GPGME_EVENT_DONE.
(_gpgme_gpgsm_release): Remove variable PID. Use new variable
names to close the file descriptors.
(_gpgme_gpgsm_op_decrypt): Use new variable names,
(_gpgme_gpgsm_op_encrypt): Likewise.
(_gpgme_gpgsm_op_genkey): Likewise.
(_gpgme_gpgsm_op_import): Likewise.
(_gpgme_gpgsm_op_keylist): Likewise.
(_gpgme_gpgsm_op_keylist_ext): Likewise.
(_gpgme_gpgsm_op_sign): Likewise.
(_gpgme_gpgsm_op_verify): Likewise.
(gpgsm_status_handler): Drop argument PID. Change return type to
void. Close status pipe before returning because of EOF or error.
(_gpgme_gpgsm_add_io_cb): New function.
(_gpgme_gpgsm_start): Use _gpgme_gpgsm_add_io_cb to register
callback function.
(_gpgme_gpgsm_set_io_cbs): New function.
* engine-gpgsm.h: New prototype for _gpgme_gpgsm_set_io_cbs.
* engine.c (_gpgme_engine_set_io_cbs): New function.
* engine.h: New prototype for _gpgme_engine_set_io_cbs.
Steffen Hansen [Mon, 10 Jun 2002 11:24:39 +0000 (11:24 +0000)]
more cert. info features
Werner Koch [Tue, 4 Jun 2002 14:01:11 +0000 (14:01 +0000)]
* gpgsm/t-encrypt.c (main): Add a simple option parser and allow
to specify an encryption key.
Marcus Brinkmann [Tue, 4 Jun 2002 12:28:17 +0000 (12:28 +0000)]
Prepare everything for CVS hackery.
Marcus Brinkmann [Tue, 4 Jun 2002 12:20:46 +0000 (12:20 +0000)]
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
Released 0.3.7.
* configure.ac (AC_INIT): Set version to 0.3.7.
(LIBGPGME_LT_REVISION): Add one.
* README: Document version requirement correctly.
Marcus Brinkmann [Tue, 4 Jun 2002 12:19:00 +0000 (12:19 +0000)]
Updates.
Marcus Brinkmann [Tue, 4 Jun 2002 12:12:08 +0000 (12:12 +0000)]
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Document new autodetection.
Marcus Brinkmann [Tue, 4 Jun 2002 10:56:33 +0000 (10:56 +0000)]
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (DISTCLEANFILES): New variable.
Marcus Brinkmann [Tue, 4 Jun 2002 10:40:34 +0000 (10:40 +0000)]
2002-06-04 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (libgpgme_la_SOURCES): Remove mutex.h.
Marcus Brinkmann [Sun, 2 Jun 2002 23:09:16 +0000 (23:09 +0000)]
2002-06-03 Marcus Brinkmann <marcus@g10code.de>
* key.c: Include <ctype.h>.
(_gpgme_key_append_name): Skip one more char when
processing escaped char. Submitted by Marc Mutz <mutz@kde.org>.
Handle hexadecimal encodings. Also reported by Marc. Thanks!
Marcus Brinkmann [Sun, 2 Jun 2002 20:43:04 +0000 (20:43 +0000)]
2002-06-02 Marcus Brinkmann <marcus@g10code.de>
* acinclude.m4: Fix Pth check so that it doesn't error out if pth
is not found.
gpgme/
2002-06-02 Marcus Brinkmann <marcus@g10code.de>
* ath.h: Enable the _gpgme_ prefix. Fix all those prefix macros.
* posix-sema.c: Use that prefix here.
* posix-io.c: Include "ath.h".
(_gpgme_io_read): Use _gpgme_ath_read instead read.
(_gpgme_io_write): Use _gpgme_ath_write instead write.
(_gpgme_io_waitpid): Use _gpgme_ath_waitpid instead waitpid.
(_gpgme_io_select): Use _gpgme_ath_select instead select.
Marcus Brinkmann [Sun, 2 Jun 2002 19:19:25 +0000 (19:19 +0000)]
2002-06-02 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Add checks for Pth and pthreads.
* acinclude.m4: Add slightly hacked check for pth (seems to be an
autoconf version problem).
gpgme/
2002-06-02 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (ath_components): New variable.
(ath_components_pthread): Likewise.
(ath_components_pth): Likewise.
(system_components): Add ath_componentes.
* ath.h: New file.
* ath.c: Likewise.
* ath-pthread.c: Likewise.
* ath-pth.c: Likewise.
* posix-sema.c (_gpgme_sema_cs_enter): Rework to use the ATH
interface.
* mutex.h: Remove file.
Karl-Heinz Zimmer [Sat, 1 Jun 2002 15:35:07 +0000 (15:35 +0000)]
sync our cryptplug.h with the version in KDE/libkdenetwork/ that was corrected my Marc Mutz.
Steffen Hansen [Fri, 31 May 2002 15:34:39 +0000 (15:34 +0000)]
more cert info
Karl-Heinz Zimmer [Fri, 31 May 2002 12:00:18 +0000 (12:00 +0000)]
Bugfix: use fingerprint as found in "fpr" only if no key was found by gpgme_get_sig_key()
Karl-Heinz Zimmer [Fri, 31 May 2002 11:08:54 +0000 (11:08 +0000)]
Matze's patch for showing colored bars at S/MIME messages as well as at OpenPGP messages.
Karl-Heinz Zimmer [Fri, 31 May 2002 09:28:58 +0000 (09:28 +0000)]
more error handling
Steffen Hansen [Thu, 30 May 2002 17:19:11 +0000 (17:19 +0000)]
small fix
Werner Koch [Thu, 30 May 2002 09:06:45 +0000 (09:06 +0000)]
* key.c (gpgme_key_get_string_attr): Return NULL when asking for
an issuer with IDX > 0. We don't support altIssuerNames for now.
Steffen Hansen [Thu, 30 May 2002 06:24:19 +0000 (06:24 +0000)]
* cryptplug.h, gpgmeplug.c: Added certificate info listing functions.
Not yet complete.
Converted more C99 style comments to "classic" style.
Marcus Brinkmann [Sun, 26 May 2002 20:12:51 +0000 (20:12 +0000)]
2002-05-26 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi: Some typographical correctons throughout.