GnuPG Made Easy. NOTE: Maintainers are not tracking this mirror. Do not make pull requests here, nor comment any commits, submit them usual way to bug tracker (https://www.gnupg.org/documentation/bts.html) or to the mailing list (https://www.gnupg.org/documentation/mailing-lists.html).
Go to file
Marcus Brinkmann 1f5180f4b0 2002-02-02 Marcus Brinkmann <marcus@g10code.de>
This patch has gotten a bit large... mmh.  The main thing that
	happens here is that error values are now not determined in the
	operation function after gpgme_wait completed, but in the status
	handler when EOF is received.  It should always be the case that
	either an error is flagged or EOF is received, so that after a
	gpgme_wait you should never have the situation that no error is
	flagged and EOF is not received.  One problem is that the engine
	status handlers don't have access to the context, a horrible
	kludge works around this for now.  All errors that happen during a
	pending operation should be catched and reported in ctx->error,
	including out-of-core and cancellation.  This rounds up neatly a
	couple of loose ends, and makes it possible to pass up any errors
	in the communication with the backend as well.  As a bonus, there
	will be a function to access gpgme->wait, so that the operations
	can truly be implemented with their _start function.

	* engine-gpgsm.c (gpgsm_status_handler): Horrible kludge to report
	error back to the context.
	* rungpg.c (gpg_status_handler): Same horrible kludge applied here.

	* engine-gpgsm.c (gpgsm_assuan_simple_command): Add error checking.

	* wait.c (_gpgme_wait_on_condition): If canceled, set CTX->error
	to a value indication that.

	* verify.c (add_notation): Set error, not out_of_core.
	(finish_sig): Likewise.
	(gpgme_op_verify_start): Don't clear out_of_core.
	(_gpgme_verify_status_handler): At EOF, clean up the notation data.
	(gpgme_op_verify): And don't do it here.

	* trustlist.c (trustlist_status_handler): Check error, not out_of_core.
	(gpgme_op_trustlist_start): Don't clear out_of_core.
	(gpgme_op_trustlist_next): Check error, not out_of_core.
	(gpgme_op_trustlist_end): Likewise.

	* ops.h (test_and_allocate_result): New macro.
	(_gpgme_passphrase_result): Remove prototype.
	* delete.c (gpgme_op_delete): Return error from context.
	(delete_status_handler): Use macro test_and_allocate_result.
	Perform error checking at EOF.
	(gpgme_op_delete_start): Release result.
	* passphrase.c (_gpgme_passphrase_status_handler): Use macro
	test_and_allocate_result, and perform error checking here.
	(_gpgme_passphrase_result): Function removed.
	* sign.c (gpgme_op_sign_start): Do not set out_of_core to zero.
	(gpgme_op_sign): Just return the error value from the context.
	(sign_status_handler): Only progress if no error is set yet.  If
	we process an EOF, set the resulting error value (if any).
	* decrypt.c (_gpgme_decrypt_result): Function removed.
	(create_result_struct): Function removed.
	(_gpgme_decrypt_status_handler): Use macro test_and_allocate_result,
	caclulate error on EOF, do not progress with errors.
	(_gpgme_decrypt_start): Do not set out_of_core to zero.
	(gpgme_op_decrypt): Just return the error value from the context.
	* encrypt.c (encrypt_status_handler): Perform the error checking
	here.
	(gpgme_op_encrypt_start): Do not clear out_of_core.
	* export.c (export_status_handler): Return if error is set in context.
	(gpgme_op_export_start): Release result.
	(gpgme_op_export): Return error from context.
	* decrypt-verify.c (gpgme_op_decrypt_verify): Return the error in
	the context.
	* genkey.c (genkey_status_handler): Use macro
	test_and_allocate_result.  Perform error checking at EOF.
	(gpgme_op_genkey): Just return the error from context.
	* import.c (gpgme_op_import): Return the error from context.
	(import_status_handler): Use macro test_and_allocate_result.
	* keylist.c (gpgme_op_keylist_start): Do not clear out_of_core.
	(gpgme_op_keylist_next): Return error of context.
	(keylist_colon_handler): Set error instead out_of_code.
	(finish_key): Likewise.

	* context.h: Remove member out_of_core, add member error.
	* gpgme.c (_gpgme_release_result): Clear error flag.

	* engine.h (_gpgme_engine_get_error): New prototype.
	* engine.c (_gpgme_engine_get_error): New function.
	* engine-gpgsm.c (_gpgme_gpgsm_get_error): New function.

	* engine-gpgsm.c (map_assuan_error): New function.
	(gpgsm_assuan_simple_command): Change return type to GpgmeError,
	use the new function to map error values.
	(gpgsm_set_fd): Change return type tp GpgmeError.
	(_gpgme_gpgsm_op_decrypt): Change type of ERR to GpgmeError.
	(gpgsm_set_recipients): Likewise.  Change type of return value
	equivalently.  Adjust error values.
	(_gpgme_gpgsm_op_import): Likewise.
	(_gpgme_gpgsm_op_sign): Likewise.
	(struct gpgsm_object_s): New member error.
	(gpgsm_status_handler): Set error if error occurs.  Determine
	error number from ERR line received.  If assuan_read_line fails,
	terminate the connection.
2002-02-02 03:52:59 +00:00
assuan Update to latest version. 2002-02-01 19:54:25 +00:00
bonobo Add .cvsignore files. Suggested by Jan-Oliver Wagner <jan@intevation.de>. 2001-12-05 19:50:45 +00:00
complus Revert cruft from last check in. 2001-12-19 17:26:54 +00:00
doc doc/ 2002-01-31 00:31:44 +00:00
gpgme 2002-02-02 Marcus Brinkmann <marcus@g10code.de> 2002-02-02 03:52:59 +00:00
gpgmeplug 2002-02-01 Marcus Brinkmann <marcus@g10code.de> 2002-02-01 20:28:35 +00:00
jnlib Update to current version in newpg module. 2002-01-22 16:29:12 +00:00
tests doc/ 2002-01-30 21:52:32 +00:00
.cvsignore Revert cruft from last check in. 2001-12-19 17:26:54 +00:00
acconfig.h 2001-11-20 Marcus Brinkmann <marcus@g10code.de> 2001-11-20 04:02:55 +00:00
acinclude.m4 * acinclude.m4 (GNUPG_FIX_HDR_VERSION): Fixed for new automake. 2001-12-18 18:46:00 +00:00
AUTHORS Typo fixes and new gpgme_get_op_info 2001-08-28 11:11:10 +00:00
autogen.sh 2001-12-18 Marcus Brinkmann <marcus@g10code.de> 2001-12-18 23:32:08 +00:00
ChangeLog 2002-01-22 Marcus Brinkmann <marcus@g10code.de> 2002-01-22 16:34:52 +00:00
configure.ac 2002-01-22 Marcus Brinkmann <marcus@g10code.de> 2002-01-22 16:34:52 +00:00
gpgme.txt Update the file (but not yet sent to the GNU people). 2001-12-18 23:50:51 +00:00
INSTALL Release 0.2.1 2001-04-02 08:40:32 +00:00
Makefile.am 2001-11-21 Marcus Brinkmann <marcus@g10code.de> 2001-11-21 21:31:07 +00:00
NEWS Be a bit clearer. 2002-01-30 01:47:29 +00:00
README Some small updates. 2002-01-22 16:55:58 +00:00
README-alpha Starting project 'GnuPG Made Easy' 2000-10-27 14:55:24 +00:00
THANKS New API to switch to S/MIME. There is no code yet behind it. 2001-10-15 12:19:14 +00:00
TODO doc/ 2002-01-31 00:31:44 +00:00

                  GPGME - GnuPG Made Easy
                ---------------------------

             !!!! THIS IS WORK IN PROGRESS !!!

If you want to hack on it, start with one of the `tests/t-foo'
programs.

For support of the OpenPGP protocol (default), you need the latest CVS
version of GnuPG 1.0, see `http://www.gnupg.org/cvs-access.html'.

You need at least GnuPG 1.0.6, but don't use a 1.1.x version.

If configure can't find the `gpg' binary in your path, you can specify
the location with the --with-gpg=/path/to/gpg argument to configure.

For support of the CMS (Cryptographic Message Syntax) protocol, you
need the latest CVS version of GpgSM, module name `newpg', at
`:pserver:anoncvs@cvs.gnupg.org:/cvs/aegypten'.

You need at least GpgSM 0.0.0.

If configure can't find the `gpgsm' binary in your path, you can
specify the location with the --with-gpgsm=/path/to/gpgsm argument to
configure.

To enable the CryptPlug GPGME PlugIn for both protocols, use the
`--enable-gpgmeplug' option to the configure script.  `gpgmeplug' is
experimental and you should not assume that it will stay with gpgme.
The plug-ins are installed by `make install' in `pkglibdir', normally
`PREFIX/lib/gpgme'.

Before building the CVS version following the generic install
instructions in `INSTALL', you need to set up the build scripts with
`./autogen.sh'.  To build the W32 version, use `./autogen.sh
--build-w32'.  You also need to enable maintainer mode at configure
time with `--enable-maintainer-mode', or the documentation will not
built (because the version.texi won't be generated unless maintainer
mode is enabled).

Please subscribe to the gnupg-devel@gnupg.org mailing list if you want
to do serious work.