Commit Graph

2536 Commits

Author SHA1 Message Date
Karl-Heinz Zimmer
83855db196 signing now returns only the SIGNATURE - not the original text - since building of the S/MIME object is done in the calling program (the MUA...) 2001-11-24 10:51:55 +00:00
Marcus Brinkmann
8c3726d634 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_sign): Implement it according to
	the current protocol definition.
2001-11-23 11:52:09 +00:00
Karl-Heinz Zimmer
64da5fc845 signing of mail bodies is working now - buuuuut: I changed the behaviour of the 'signMessage()' function, it now returns *only* the signature part (with a trailing zero). This is neccessary to avoid confugion at the KMail side: otherwise KMail might try to convert the whole MIME block into quoted printable - of course this is only allowed for the body part but not for the signature part. 2001-11-23 02:08:53 +00:00
Marcus Brinkmann
09b1be8339 Explain more of the build system. 2001-11-23 01:12:04 +00:00
Marcus Brinkmann
662f9b185b 2001-11-23 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_new): Set CLOEXEC flag for parent
	ends of the pipe.
2001-11-23 00:48:51 +00:00
Marcus Brinkmann
d1ded512c4 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c: Include stdlib.h and string.h.  Also include,
	for now, rungpg.h and status-table.h.
	(gpgsm_status_handler): Implement more of the status handler.
2001-11-22 21:27:41 +00:00
Marcus Brinkmann
884de0606b 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* engine.c (_gpgme_engine_op_decrypt): Implement CMS case.
	(_gpgme_engine_op_delete): Likewise.
	(_gpgme_engine_op_encrypt): Likewise.
	(_gpgme_engine_op_export): Likewise.
	(_gpgme_engine_op_genkey): Likewise.
	(_gpgme_engine_op_keylist): Likewise.
	(_gpgme_engine_op_sign): Likewise.
	(_gpgme_engine_op_trustlist): Likewise.

	* engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): New function.
	(gpgsm_assuan_simple_command): Likewise.
	(gpgsm_set_recipients): Likewise.
	(gpgsm_set_fd): Reimplement using gpgsm_assuan_simple_command.
	(_gpgme_gpgsm_op_delete): New function.
	(_gpgme_gpgsm_op_export): Likewise.
	(_gpgme_gpgsm_op_genkey): Likewise.
	(_gpgme_gpgsm_op_sign): Likewise.
	(_gpgme_gpgsm_op_keylist): Likewise.
	(_gpgme_gpgsm_op_trustlist): Likewise.
	(_gpgme_gpgsm_release): Release command.
	(_gpgme_gpgsm_op_decrypt): Allocate command.
	(_gpgme_gpgsm_op_import): Likewise.
	(gpgsm_status_handler): Also treat `ERR' strings as EOF.
2001-11-22 20:48:37 +00:00
Marcus Brinkmann
8993173dfb 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (gpgme_set_protocol): New prototype.

2001-11-22  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (libgpgsmplug_la_LIBADD): New variable.
	(libgpgsmplug_la_LDFLAGS): Likewise.
	(libgpgsmplug_la_SOURCES): Likewise.
	(lib_LTLIBRARIES): Add libgpgsmplug.la.
	(INCLUDES): Include the local gpgme.h.

	* gpgmeplug.c (signMessage): Set protocol.
	(GPGMEPLUG_PROTOCOL) [!GPGMEPLUG_PROTOCOL]: Set
	GPGMEPLUG_PROTOCOL.
	* gpgsmplug.c: New file.
2001-11-22 18:48:53 +00:00
Karl-Heinz Zimmer
c703e0c27e removed stupid C bug (malloc of strlen(..) instead of 1+strlen) 2001-11-22 17:32:21 +00:00
Marcus Brinkmann
6290f74605 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_op_decrypt): New function.
	(_gpgme_gpgsm_op_import): Likewise.
2001-11-22 15:22:27 +00:00
Marcus Brinkmann
c23a9b5e74 2001-11-22 Marcus Brinkmann <marcus@gnu.org>
* engine-gpgsm.c: Shuffle around header inclusion a bit, to still
	keep them seperate.
	(_gpgme_set_status_handler) [!ENABLE_GPGSM]: New function.
2001-11-22 13:47:46 +00:00
Werner Koch
9ece643cba * engine-gpgsm.c: Include more headers so that NULL and mk_error
is defined even with an undefined GPGSM_PATH.
2001-11-22 10:29:52 +00:00
Karl-Heinz Zimmer
66f4b09b45 Now send the signature back to the calling function (instead of just printing it to stdout) 2001-11-22 09:36:53 +00:00
Marcus Brinkmann
679d5c2b49 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (gpg_inbound_handler, write_mem_data, write_cb_data,
	gpg_outbound_handler): Moved to ...
	* data.c (_gpgme_data_inbound_handler, write_mem_data,
	write_cb_data, _gpgme_data_outbound_handler): ... here.  Make the
	_gpgme_* ones non-static.
	* data.c: Include io.h.

	* ops.h (_gpgme_data_inbound_handler): New prototype.
	(_gpgme_data_outbound_handler): Likewise.
	(_gpgme_gpg_spawn): Use these new functions.

	* engine-gpgsm.h (_gpgme_gpgsm_op_decrypt, _gpgme_gpgsm_op_delete,
	_gpgme_gpgsm_op_encrypt, _gpgme_gpgsm_op_export,
	_gpgme_gpgsm_op_genkey, _gpgme_gpgsm_op_import,
	_gpgme_gpgsm_op_keylist, _gpgme_gpgsm_op_sign,
	_gpgme_gpgsm_op_trustlist, _gpgme_gpgsm_op_verify,
	_gpgme_gpgsm_start, _gpgme_gpgsm_set_status_handler): New prototype.
	Include <rungpg.h> for status handler function.

	* engine-gpgsm.c (struct gpgsm_object_s): New members input_fd,
	input_data, output_fd, output_data, message_fd, message_data, command
	and status.
	(_gpgme_gpgsm_new): Open input, output and message pipes before
	connecting to the client.  Close server's ends afterwards.
	(_gpgme_gpgsm_release): Close open file descriptors.  Remove
	server process from wait queue.
	(_gpgme_gpgsm_op_verify, _gpgme_gpgsm_start,
	_gpgme_gpgsm_set_status_handler, gpgms_status_handler): New function.

	* engine.c (_gpgme_engine_start): Implement for GPGME_PROTOCOL_CMS.
	(_gpgme_engine_set_status_handler): Likewise.
	(_gpgme_engine_op_verify): Likewise.
2001-11-22 03:08:58 +00:00
Marcus Brinkmann
3f1c299866 * assuan-connect.c (assuan_get_pid): New function.
* assuan.h: Prototype.  Include sys/types.h for pid_t,
	and stdio.h for FILE *.
2001-11-22 03:08:07 +00:00
Marcus Brinkmann
862ef3cf1c 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_CONFIG_FILES): Add tests/gpg/Makefile and
	tests/gpgsm/Makefile.
2001-11-22 03:07:10 +00:00
Marcus Brinkmann
790a8e192f 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* gpg/: New directory.
	* Makefile.am, t-verify.c, t-encrypt.c, t-signers.c, t-trustlist.c,
	t-sign.c, t-keylist.c, t-import.c, t-genkey.c, t-export.c,
	t-decrypt-verify.c, t-decrypt.c, t-version.c, t-data.c, mkdemodirs.
	cipher-1.asc, cipher-2.asc, geheim.txt, pubdemo.asc, pubkey-1.asc,
	secdemo.asc, seckey-1.asc): Move to sub directory gpg/.

	* gpg/Makefile.am (INCLUDES): Include gpgme/, not include/ and
	intl/.
	(LDD): Correct relative path to gpgme library.
	(TESTS): Remove t-version and t-data.
	* gpg/t-verify.c, gpg/t-encrypt.c, gpg/t-signers.c, gpg/t-trustlist.c,
	gpg/t-sign.c, gpg/t-keylist.c, gpg/t-import.c, gpg/t-genkey.c,
	gpg/t-export.c, gpg/t-decrypt-verify.c, gpg/t-decrypt.c,
	t-version.c, t-data.c): Include gpgme.h, not "../gpgme/gpgme.h".

	* Makefile.am: New file.
	* gpgsm/: New directory.
	* gpgsm/Makefile.am: New file.
2001-11-22 03:01:26 +00:00
Karl-Heinz Zimmer
9c6a652d83 corrected includes 2001-11-21 23:34:51 +00:00
Karl-Heinz Zimmer
9887271866 create signature (and write it to stdout for testing) 2001-11-21 23:23:24 +00:00
Karl-Heinz Zimmer
a80e3d381c change Makefile to create shared lib 2001-11-21 23:20:49 +00:00
Marcus Brinkmann
bef5ad4860 cosmetic change 2001-11-21 21:32:33 +00:00
Marcus Brinkmann
75e7fc2e24 2001-11-21 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (gpgmeplug): New variable, set to gpgmeplug if
	[BUILD_GPGMEPLUG].
	* configure.ac (AC_CONFIG_FILES): Add gpgmeplug/Makefile.
	Support --enable-gpgmeplug.
2001-11-21 21:31:07 +00:00
Marcus Brinkmann
42bdc1177d . 2001-11-21 21:09:50 +00:00
Marcus Brinkmann
adfc1ccd5d 2001-11-21 Marcus Brinkmann <marcus@g10code.de>
* gpgmeplug.c: Include config.h only if [HAVE_CONFIG_H].  Do not
	include util.h.
	(deinitialize): Use free, not _gpgme_free.
	(setDirectoryServers): Use calloc, not xtrycalloc.  Use free, not
	_gpgme_free.  Use malloc instead xtrymalloc.
	(appendDirectoryServer): Use realloc, not xtryrealloc.
2001-11-21 21:08:02 +00:00
Marcus Brinkmann
9cbf7e459c 2001-11-21 Marcus Brinkmann <marcus@g10code.de>
* autogen.sh: Tighten version dependencies.
2001-11-21 20:54:39 +00:00
Karl-Heinz Zimmer
a73c8142af finished implementation of DirectoryServices storing/retrieving 2001-11-21 16:57:54 +00:00
Karl-Heinz Zimmer
168f43d4ec (security checkin) currently working on signing messages 2001-11-21 14:18:52 +00:00
Karl-Heinz Zimmer
4e1814223b configure struct updated according to modified cryptplug.h 2001-11-21 10:55:02 +00:00
Karl-Heinz Zimmer
18432f56be GPGME Plug-In initial checkin. Saving/restoring of configuration is working. 2001-11-21 09:42:08 +00:00
Werner Koch
e44f5be927 Added gpgmeplug/ for experiments 2001-11-21 09:21:56 +00:00
Marcus Brinkmann
f1805f43bd correct history, har har 2001-11-21 03:45:20 +00:00
Marcus Brinkmann
3f713d2e64 add some more items 2001-11-21 03:43:16 +00:00
Marcus Brinkmann
da95ecfc2c 2001-11-21 Marcus Brinkmann <marcus@g10code.de>
* context.h: Do not include rungpg.h, but engine.h.
	(struct gpgme_context_s): Replace member gpg with engine.
	* gpgme.c (gpgme_release): Release engine, not gpg.

	* recipient.c (_gpgme_append_gpg_args_from_recifgpients): Function
	moved ...
	* rungpg.c (_gpgme_append_gpg_args_from_recipients): ... here.
	Make static, change order of arguments, and return an error value.
	* ops.h (_gpgme_append_gpg_args_from_recipients): Removed prototype.

	* rungpg.h (_gpgme_gpg_op_verify): Add prototype.
	(_gpgme_gpg_op_encrypt): Likewise.
	(_gpgme_gpg_op_decrypt): Likewise.
	(_gpgme_gpg_op_delete): Likewise.
	(_gpgme_gpg_op_export): Likewise.
	(_gpgme_gpg_op_genkey): Likewise.
	(_gpgme_gpg_op_import): Likewise.
	(_gpgme_gpg_op_keylist): Likewise.
	(_gpgme_gpg_op_sign): Likewise.
	(_gpgme_gpg_op_trustlist): Likewise.
	* rungpg.c (_gpgme_gpg_op_verify): New function.
	(_gpgme_gpg_op_encrypt): Likewise.
	(_gpgme_gpg_op_decrypt): Likewise.
	(_gpgme_gpg_op_delete): Likewise.
	(_gpgme_gpg_op_export): Likewise.
	(_gpgme_gpg_op_genkey): Likewise.
	(_gpgme_gpg_op_import): Likewise.
	(_gpgme_gpg_op_keylist): Likewise.
	(_gpgme_gpg_op_sign): Likewise.
	(_gpgme_gpg_op_trustlist): Likewise.

	* engine.h (_gpgme_engine_set_status_handler): Add prototype.
	(_gpgme_engine_set_command_handler): Likewise.
	(_gpgme_engine_set_colon_line_handler): Likewise.
	(_gpgme_engine_op_decrypt): Likewise.
	(_gpgme_engine_op_delete): Likewise.
	(_gpgme_engine_op_encrypt): Likewise.
	(_gpgme_engine_op_export): Likewise.
	(_gpgme_engine_op_genkey): Likewise.
	(_gpgme_engine_op_import): Likewise.
	(_gpgme_engine_op_keylist): Likewise.
	(_gpgme_engine_op_sign): Likewise.
	(_gpgme_engine_op_trustlist): Likewise.
	(_gpgme_engine_op_verify): Likewise.
	(_gpgme_engine_start): Likewise.
	* engine.c (_gpgme_engine_set_status_handler): New function.
	(_gpgme_engine_set_command_handler): Likewise.
	(_gpgme_engine_set_colon_line_handler): Likewise.
	(_gpgme_engine_op_decrypt): Likewise.
	(_gpgme_engine_op_delete): Likewise.
	(_gpgme_engine_op_encrypt): Likewise.
	(_gpgme_engine_op_export): Likewise.
	(_gpgme_engine_op_genkey): Likewise.
	(_gpgme_engine_op_import): Likewise.
	(_gpgme_engine_op_keylist): Likewise.
	(_gpgme_engine_op_sign): Likewise.
	(_gpgme_engine_op_trustlist): Likewise.
	(_gpgme_engine_op_verify): Likewise.
	(_gpgme_engine_start): Likewise.

	* verify.c (gpgme_op_verify_start): Reimplement in terms of above
	functions.
	* encrypt.c (gpgme_op_encrypt_start): Likewise.
	* decrypt.c (_gpgme_decrypt_start): Likewise.
	* passphrase.c (_gpgme_passphrase_start): Likewise.
	* keylist.c (gpgme_op_keylist_start): Likewise.
2001-11-21 03:40:17 +00:00
Marcus Brinkmann
38c00b4b32 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
* types.h: Add types EngineObject and GpgsmObject.

	* Makefile.am (libgpgme_la_SOURCES): Add engine-gpgsm.h,
	engine-gpgsm.c, engine.h and engine.c.
	* engine.h: New file.
	* engine.c: Likewise.
	* engine-gpgsm.h: Likewise.
	* engine-gpgsm.c: Likewise.

	* rungpg.c (_gpgme_gpg_get_version): New function.
	(_gpgme_gpg_check_version): Likewise.
	* rungpg.h: Add prototypes for _gpgme_gpg_get_version and
	_gpgme_gpg_check_version.

	* version.c (compare_versions): Rename to ...
	(_gpgme_compare_versions): ... this.  Make non-static.
	(gpgme_check_version): Use _gpgme_compare_versions rather than
	compare_versions.
	(gpgme_check_engine): Likewise.
	* ops.h (_gpgme_get_program_version): Add prototype.
2001-11-20 06:04:15 +00:00
Marcus Brinkmann
4d3ab72fe5 remove some CVS conflict cruft 2001-11-20 06:03:02 +00:00
Marcus Brinkmann
ad428df905 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
* types.h: Add types EngineObject and GpgsmObject.

	* Makefile.am (libgpgme_la_SOURCES): Add engine-gpgsm.h,
	engine-gpgsm.c, engine.h and engine.c.
	* engine.h: New file.
	* engine.c: Likewise.
	* engine-gpgsm.h: Likewise.
	* engine-gpgsm.c: Likewise.

	* rungpg.c (_gpgme_gpg_get_version): New function.
	(_gpgme_gpg_check_version): Likewise.
	* rungpg.h: Add prototypes for _gpgme_gpg_get_version and
	_gpgme_gpg_check_version.

	* version.c (compare_versions): Rename to ...
	(_gpgme_compare_versions): ... this.  Make non-static.
	(gpgme_check_version): Use _gpgme_compare_versions rather than
	compare_versions.
	(gpgme_check_engine): Likewise.
	* ops.h (_gpgme_get_program_version): Add prototype.
2001-11-20 06:01:24 +00:00
Marcus Brinkmann
a441158cc7 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (SUBDIRS): Support building the assuan library
	(currently if GPGSM_PATH is set)..
	* configure.ac: Support building the assuan library.
	* assuan: New directory, populated with the Assuan library
	(copied from the newpg repository).

gpgme/
2001-11-20  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (libgpgme_la_INCLUDES): Remove obsolete directive.
	(AM_CPPFLAGS): New directive [BUILD_ASSUAN].
	(libgpgme_la_LIBADD): Likewise.
2001-11-20 05:27:46 +00:00
Marcus Brinkmann
a1acb1d69a 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_GPGSM_VERSION): New variable.  Treat it
	similarly to NEED_GPGSM_VERSION.
	* acconfig.h: Likewise.
2001-11-20 04:02:55 +00:00
Marcus Brinkmann
bf2b24ae11 2001-11-20 Marcus Brinkmann <marcus@g10code.de>
* version.c: Remove global variables lineno and
	tmp_engine_version.
	(version_handler): Removed.
	(_gpgme_get_program_version): New function.
	(get_engine_info): Don't use context and version_handler,
	but _gpgme_get_program_version.
	* ops.h (_gpgme_get_program_version): Add prototype for
	_gpgme_get_program_version (we expect to use it elsewhere soon).
2001-11-20 04:02:38 +00:00
Marcus Brinkmann
1a9da605ad 2001-11-18 Marcus Brinkmann <marcus@g10code.de>
* configure.in: Renamed to ...
	* configure.ac: ... this.  Update to autoconf 2.52.  Lots of small
	changes in the transition.  Support --with-gpg=PATH and
	--with-gpgsm=PATH options.  Check if test suites can be run.
	* acconfig.h: Add GPGSM_PATH.
	* Makefile.am: New variable `tests', set to `tests' if
	RUN_GPG_TESTS.
	(SUBDIRS): Replace string `tests' with variable `tests'.

gpgme/
2001-11-18  Marcus Brinkmann  <marcus@g10code.de>

	* configure.in: Renamed to ...
	* configure.ac: ... this.  Update to autoconf 2.52.  Lots of small
	changes in the transition.  Support --with-gpg=PATH and
	--with-gpgsm=PATH options.  Check if test suites can be run.
	* acconfig.h: Add GPGSM_PATH.
	* Makefile.am: New variable `tests', set to `tests' if
	RUN_GPG_TESTS.
	(SUBDIRS): Replace string `tests' with variable `tests'.
2001-11-18 03:31:31 +00:00
Marcus Brinkmann
590bd5a7d8 Fix small error. 2001-11-16 12:13:01 +00:00
Marcus Brinkmann
3d97e032f8 * TODO: Remove obsolete items, categorize another.
* NEWS: Add new feature decrypt-verify.
2001-11-16 01:44:49 +00:00
Marcus Brinkmann
d65c4b72d9 gpgme/
2001-11-16  Marcus Brinkmann  <marcus@g10code.de>

	* decrypt-verify.c: New file.
	* Makefile.am (libgpgme_la_SOURCES): Add decrypt-verify.c.
	* types.h: Add decrypt-verify types.
	* ops.h: Likewise.
	* context.h: Add result type for decrypt-verify.
	* gpgme.h: Add decrypt-verify prototypes.

	* decrypt.c (decrypt_status_handler): Renamed to ...
	(_gpgme_decrypt_status_handler): ... this.  Make non-static.
	(_gpgme_decrypt_start): New function, derived from
	gpgme_op_decrypt_start.
	(gpgme_op_decrypt_start): Reimplement in terms of
	_gpgme_decrypt_start.
	(_gpgme_decrypt_result): New function to retrieve error value.
	(gpgme_op_decrypt): Use _gpgme_decrypt_result.
	* ops.h: Add prototypes for new functions.

	* verify.c (verify_status_handler): Renamed to ...
	(_gpgme_verify_status_handler): ... this.  Make non-static.
	(gpgme_op_verify_start): Use new function name.
	(intersect_stati): Renamed to ...
	(_gpgme_intersect_stati): ... this.  Make non-static.
	(gpgme_op_verify): Use new name.
	* ops.h: Add prototypes for new functions.

tests/
2001-11-16  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (TESTS): Add t-decrypt-verify.
	* t-decrypt-verify.c: New file.
	* cipher-2.asc: Likewise.
2001-11-16 01:37:06 +00:00
Marcus Brinkmann
550bc31b44 2001-11-16 Marcus Brinkmann <marcus@g10code.de>
* passphrase.c: New file.
	* Makefile.am (libgpgme_la_SOURCES): Add passphrase.c.
	* ops.h (_gpgme_passphrase_result): Add prototypes from
	passphrase.c.
	* types.h: Likewise.
	* context.h: Add member passphrase to result.
	* gpgme.c (_gpgme_release_result): Release passphrase member.

	* decrypt.c: Some formatting and variable name changes (like
	CTX instead C).
	(struct decrypt_result_s): Remove members now found in
	passphrase result.
	(_gpgme_release_decrypt_result): Don't release removed members.
	(decrypt_status_handler): Call _gpgme_passphrase_status_handler,
	and don't handle the cases catched there.
	(command_handler): Removed.
	(gpgme_op_decrypt_start): Don't set command handler, but invoke
	_gpgme_passphrase_start which does it.
	(gpgme_op_decrypt): Invoke _gpgme_passphrase_result and drop the
	cases covered by it.

	* sign.c Some formatting and variable name changes (like
	CTX instead C).
	(struct sign_result_s): Remove members now found in
	passphrase result.
	(_gpgme_release_sign_result): Don't release removed members.
	(sign_status_handler): Call _gpgme_passphrase_status_handler,
	and don't handle the cases catched there.
	(command_handler): Removed.
	(gpgme_op_sign_start): Don't set command handler, but invoke
	_gpgme_passphrase_start which does it.
	(gpgme_op_sign): Invoke _gpgme_passphrase_result and drop the
	cases covered by it.
2001-11-16 00:20:11 +00:00
Marcus Brinkmann
4374f7c57f 2001-11-15 Marcus Brinkmann <marcus@g10code.de>
* decrypt.c (command_handler): Fix last change.
2001-11-15 21:57:31 +00:00
Marcus Brinkmann
9144124a61 2001-11-15 Marcus Brinkmann <marcus@g10code.de>
* verify.c (_gpgme_release_verify_result): Rename RES to RESULT.
	Rename R2 to NEXT_RESULT.
	(intersect_stati): Rename RES to RESULT.
	(gpgme_get_sig_status): Likewise.  Do not check return_type, but
	the member verify of result.
	(gpgme_get_sig_key): Likewise.

	* sign.c (_gpgme_release_sign_result): Rename RES to RESULT.  If
	RESULT is zero, return.
	(sign_status_handler, command_handler): Do not check return_type,
	but the member sign of result.
	(gpgme_op_sign): Likewise.  Drop assertion.

	* encrypt.c (_gpgme_release_encrypt_result): Rename RES to RESULT.
	If RESULT is zero, return.
	(encrypt_status_handler): Do not check return_type, but the member
	encrypt of result.
	(gpgme_op_encrypt): Likewise.  Drop assertion.

	* decrypt.c (_gpgme_release_decrypt_result): Rename RES to RESULT.
	(create_result_struct): Do not set result_type.
	(command_handler, decrypt_status_handler): Do not check
	return_type, but the member decrypt of result.
	(gpgme_op_decrypt): Likewise.  Drop assertion.

	* context.h (enum ResultType): Removed.
	(struct gpgme_context_s): Remove member result_type.
	(struct result): Replaces union result.
	* gpgme.c: Include string.h.
	(_gpgme_release_result): Release all members of c->result, which
	is now a struct.  Zero out all members of the struct afterwards.
2001-11-15 21:32:09 +00:00
Marcus Brinkmann
49a25a82e2 2001-11-11 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (_gpgme_gpg_release): Release GPG->cmd.cb_data.
	Release all members of the list GPG->arglist.
	Reported by Michael Schmidt <mschmidt@cs.uni-sb.de>.
2001-11-11 18:54:57 +00:00
Marcus Brinkmann
1ecdde3ced gpgme/
2001-11-02  Marcus Brinkmann  <marcus@g10code.de>

	* rungpg.c (pipemode_copy): Change type of NBYTES to size_t.

	* key.c: Include string.h.
	* data.c: Likewise.
	* recipient.c: Likewise.

tests/
2001-11-02  Marcus Brinkmann  <marcus@g10code.de>

	* t-data.c: Include stddef.h.
	(read_once_test): Change type of READ to size_t.
	(read_test): Likewise.
	(write_test): Likewise.
2001-11-02 15:51:15 +00:00
Marcus Brinkmann
7e53360206 2001-11-01 Marcus Brinkmann <marcus@g10code.de>
* logging.c (log_printf): Do not initialize ARG_PTR with 0, we
	don't know the correct type.  Instead, run va_start and va_end
	unconditionally.
	Reported by Jose Carlos Garcia Sogo <jsogo@debian.org>.
2001-11-02 15:23:40 +00:00
Marcus Brinkmann
deaea7bdec Fix formatting. 2001-10-29 00:08:43 +00:00