Commit Graph

1014 Commits

Author SHA1 Message Date
Werner Koch
d73a0f3c41 * 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.
2002-07-01 11:36:48 +00:00
Karl-Heinz Zimmer
0fff553077 replace many comment lines by just one single comment 2002-06-28 19:50:31 +00:00
Karl-Heinz Zimmer
68f5d46094 Make it compile. :-( 2002-06-28 19:40:13 +00:00
Karl-Heinz Zimmer
054b78bdc0 Removed silly "free( dn )" statement forgotten during my last changes in findCertificates(). 2002-06-28 19:37:06 +00:00
Werner Koch
ee970fa57d * 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.
2002-06-28 18:30:23 +00:00
Bernhard Reiter
e866179ce6 * 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.
2002-06-28 14:51:12 +00:00
Karl-Heinz Zimmer
4114f4400d internal AEgypten bugfix #1131: get full list of emails stored in certificated used for signing a received message 2002-06-28 14:12:18 +00:00
Marcus Brinkmann
406ec04563 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).
2002-06-28 12:02:43 +00:00
Marcus Brinkmann
92386f4dd1 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).
2002-06-28 01:14:41 +00:00
Marcus Brinkmann
3ccd2790b3 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.
2002-06-28 01:11:20 +00:00
Marcus Brinkmann
e0d89a9a15 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.
2002-06-27 16:34:10 +00:00
Steffen Hansen
2ea796a1a0 use gpgme_op_keylist_ext_start 2002-06-27 16:26:15 +00:00
Steffen Hansen
bb19f16ec4 handle truncated data 2002-06-27 13:15:02 +00:00
Karl-Heinz Zimmer
095eef1792 Missing implementation bug fixed: Return both error id and error plain text from decryptMessage(). 2002-06-27 08:21:58 +00:00
Karl-Heinz Zimmer
71266fd6ea Bugfix: enable function receiverCertificateDaysLeftToExpiry(). 2002-06-26 15:16:32 +00:00
Werner Koch
06cd423a8b * 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.
2002-06-26 12:49:59 +00:00
Karl-Heinz Zimmer
73f47e40b1 Make the signatureCertificateDaysLeftToExpiry() work as expected. 2002-06-26 08:04:43 +00:00
Karl-Heinz Zimmer
f97a834df6 IMPORTANT BUGFIX: Avoid random crashes in findCertificates. (This also fixes bug #1088.) 2002-06-26 04:44:58 +00:00
Karl-Heinz Zimmer
0a4a00821d Oh pazzo mio! I forgot to *use* the nice dn string actually. 2002-06-26 00:05:30 +00:00
Steffen Hansen
4783cc23da cert export/import bugfix 2002-06-25 20:24:29 +00:00
Werner Koch
e37e5beb46 Prepared for further development. 2002-06-25 19:22:12 +00:00
Werner Koch
692d0e43f4 * gpgsm/Makefile.am (DISTCLEANFILES): new. 2002-06-25 19:04:40 +00:00
Werner Koch
5df644f5cc * engine-gpgsm.c (_gpgme_gpgsm_set_io_cbs) [ENABLE_GPGSM]: Fixed
function arguments.
2002-06-25 18:50:23 +00:00
Werner Koch
f93de93870 * configure.ac: Bumbed LT version to 9/3/0.
(NEED_GPGSM_VERSION): Need 0.3.8 due to fixed export command.
2002-06-25 18:32:20 +00:00
Steffen Hansen
3debbf008e importCertificate( const char* fpr ) 2002-06-25 17:42:21 +00:00
Karl-Heinz Zimmer
da40b7130f Have additional secretOnly parameter at the findCertificates() function to allow for searching only secret keys. 2002-06-25 15:05:59 +00:00
Marcus Brinkmann
7a32c607e3 2002-06-25 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (TESTS): Add t-export.
	gpgsm/t-export.c: New file.
2002-06-25 12:12:25 +00:00
Marcus Brinkmann
3ea78f5a20 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.
2002-06-25 12:10:27 +00:00
Marcus Brinkmann
ea042a1fa9 2002-06-25 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_export): Implement.
2002-06-25 11:14:44 +00:00
Karl-Heinz Zimmer
969ceb2e6e Disable debug output 2002-06-24 21:01:18 +00:00
Karl-Heinz Zimmer
b24b335b3b Use fine DN parts reordering from within findCertificates() as well. 2002-06-24 20:25:19 +00:00
Marcus Brinkmann
2ded628d4d 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.
2002-06-21 19:16:16 +00:00
Marcus Brinkmann
a8f087da34 2002-06-21 Marcus Brinkmann <marcus@g10code.de>
* wait.c (_gpgme_remove_io_cb): Unlock FDT->lock.
2002-06-21 15:28:56 +00:00
Werner Koch
5e13668340 * 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.
2002-06-20 16:48:37 +00:00
Werner Koch
e6dc9fd6c4 * 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.
2002-06-20 13:47:24 +00:00
Werner Koch
1211f36b15 * rungpg.c (build_argv): Ignore GPG_AGENT_INFO if set but empty. 2002-06-20 13:45:50 +00:00
Werner Koch
45d99504f5 * 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.
2002-06-20 12:13:44 +00:00
Karl-Heinz Zimmer
af2050538e added some entries to DN normalization function 2002-06-20 05:05:43 +00:00
Steffen Hansen
7a0eb84f80 Show DN part names (CN=blah,O=blah...) 2002-06-20 00:44:00 +00:00
Karl-Heinz Zimmer
c445a85ff2 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. 2002-06-19 12:56:43 +00:00
Karl-Heinz Zimmer
6798c68f2f 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. 2002-06-19 10:22:49 +00:00
Marcus Brinkmann
ccde48c08d 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.
2002-06-14 20:06:35 +00:00
Marcus Brinkmann
2fe7046d15 Cosmetic fix. 2002-06-14 20:05:26 +00:00
Marcus Brinkmann
d89d383d54 Update list. 2002-06-14 19:41:43 +00:00
Marcus Brinkmann
f54a11ad14 Add items about I/O callbacks. 2002-06-14 19:40:55 +00:00
Werner Koch
276e401c42 * verify.c (gpgme_op_verify): Make sure that we never access an
unitialized result structure.
2002-06-13 08:45:32 +00:00
Steffen Hansen
1bd00d0a18 bugfix + change to the nextCertificate() function prototype 2002-06-13 01:56:31 +00:00
Werner Koch
61c97e9fa9 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.
2002-06-12 14:34:15 +00:00
Karl-Heinz Zimmer
e7dc765826 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... 2002-06-12 11:05:42 +00:00
Marcus Brinkmann
14f16305b0 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.
2002-06-11 18:12:19 +00:00