Commit Graph

2892 Commits

Author SHA1 Message Date
Werner Koch
9eb5c192b3 * keylist.c (gpgme_op_keylist_start): Do not use a verbose listing. 2002-02-14 12:43:28 +00:00
Steffen Hansen
89114b8162 Removed temporary passphrase callback 2002-02-13 19:23:00 +00:00
Werner Koch
948ee49ff7 Write a fake gpg-agent so that we can supply known passphrases to
gpgsm and setup the configuration files to use the agent.  Without
this we are testing a currently running gpg-agent which is not a
clever idea.
2002-02-13 15:05:19 +00:00
Werner Koch
accc40c84a * gpgsm/Makefile.am (private-keys-v1.d): Don't
fail when the directory already exists.
2002-02-13 15:02:09 +00:00
Werner Koch
822e098fed * vasprintf.c, fopencookie.c: Add replacement functions.
* util.h: Add prototypes for them.
2002-02-13 14:59:50 +00:00
Werner Koch
d8119956bb * configure.ac (vasprintf,fopencookie): Add checks. 2002-02-13 14:59:22 +00:00
Marcus Brinkmann
10750fcfd9 2002-02-12 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Bump version to 0.3.3.
	* jnlib/Makefile.am: Rever to older version that includes xmalloc
	but not dotlock and some other files.  Reported by St�phane
	Corth�sy.

tests/
2002-02-12  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/Makefile.am (CLEANFILES): New target.
	(distclean-local): Rename to ...
	(clean-local): ... this.
2002-02-12 22:08:10 +00:00
Marcus Brinkmann
7ee386958f Reverting last change. 2002-02-12 17:57:34 +00:00
Marcus Brinkmann
cfa8bcd174 2002-02-10 Marcus Brinkmann <marcus@g10code.de>
* Released 0.3.2.

	* configure.ac (AC_INIT): Bump version to 0.3.2.
	* jnlib/libjnlibconfig.h: Revert to older version that doesn't
	expect libgcrypt.  Reported by Jose Carlos Garcia Sogo
	<jsogo@debian.org>.
2002-02-09  Marcus Brinkmann  <marcus@g10code.de>
2002-02-10 13:31:36 +00:00
Marcus Brinkmann
a77a47722b Revert last change to this file. 2002-02-09 21:41:46 +00:00
Marcus Brinkmann
55cd54f02b Update as edited by configure. 2002-02-09 01:04:12 +00:00
Marcus Brinkmann
3cd7f60612 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Bump version to 0.3.1
2002-02-09 00:59:14 +00:00
Marcus Brinkmann
b7ac6614dd 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (./private-keys-v1.d/$(key_id).key): Fix rule.
2002-02-09 00:58:42 +00:00
Marcus Brinkmann
69bafd50b5 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (gpgsm_assuan_simple_command): Return 0 if we
	reach the end of the function.
2002-02-09 00:58:22 +00:00
Marcus Brinkmann
d85fac92fd 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Generating Keys): Fix syntax error.
2002-02-09 00:35:04 +00:00
Marcus Brinkmann
bccaa95b27 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* Released 0.3.1.

	* configure.ac (LIBGPGME_LT_CURRENT): Bump it up to 6!
	(NEED_GPGSM_VERSION): Bump it up to 0.3.0!
2002-02-09 00:26:58 +00:00
Marcus Brinkmann
b6a71ec888 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Detailed Results): Remove literal tags.
	(Generating Keys): Update documentation.
2002-02-09 00:20:48 +00:00
Marcus Brinkmann
4286ebe122 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-genkey.c: New file (not added to Makefile.am because of
	gpg-agent bug).
2002-02-09 00:07:59 +00:00
Marcus Brinkmann
82b7dc1d29 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* genkey.c (gpgme_op_genkey_start): Fix logic in validity check.
	(gpgme_op_genkey_start): Skip newlines after opening tag.

	* engine-gpgsm.c (_gpgme_gpgsm_start): Remove cruft.
2002-02-09 00:06:32 +00:00
Marcus Brinkmann
f0a45d0c20 2002-02-08 Marcus Brinkmann <marcus@g10code.de>
* genkey.c (gpgme_op_genkey_start): Allow PUBKEY and SECKEY to be
	set, and pass them down to the crypto engine.
	* engine-gpgsm.h (_gpgme_gpgsm_start): New arguments PUBKEY and SECKEY.
	* engine.h: Likewise.
	* rungpg.h (_gpgme_gpg_spawn): Likewise.
	* engine.c (_gpgme_engine_op_genkey): Likewise.  Use those
	arguments.
	* rungpg.c (_gpgme_gpg_op_genkey): Likewise.  Complain if those
	arguments are set.
	* engine-gpgsm.c (_gpgme_gpgsm_op_genkey): Likewise.  Implement
	function.

	* engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Beautify comment.
2002-02-08 22:43:44 +00:00
Marcus Brinkmann
6f2245b35d 2002-02-08 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (key_id): Update value.
	(all-local): Add .key to keyid filename.
	(./private-keys-v1.d/$(key_id)): Renamed to ...
	(./private-keys-v1.d/$(key_id).key): ... this.
	(all-local): Add ./gpgsm.conf, ./trustlist.txt.
	(./gpgsm.conf, ./trustlist.txt): New target.
	* gpgsm/567064FE6D14A17B2D811ABB407728BC558AA455: Renamed to ...
	* gpgsm/32100C27173EF6E9C4E9A25D3D69F86D37A4F939: ... this.
2002-02-08 22:36:57 +00:00
Marcus Brinkmann
92d18cde9e Add 2002 as copyright year for files changed recently without updating the
year.
2002-02-06 01:41:15 +00:00
Marcus Brinkmann
0bd08bafd9 Some minor source code cleanup. 2002-02-06 01:40:48 +00:00
Marcus Brinkmann
2cb125ccf6 2002-02-06 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (_gpgme_gpg_op_keylist): Remove handling of keylist
	mode (for now).
2002-02-06 01:34:52 +00:00
Marcus Brinkmann
a758f4c718 Update some items. 2002-02-06 01:30:27 +00:00
Marcus Brinkmann
4d40fcd82e Fill in some missing repetitive "Likewise." explanations. 2002-02-06 01:21:41 +00:00
Marcus Brinkmann
69ab559a7b doc/
2002-02-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Waiting For Completion): Adjust doc to changes in
	the code.

gpgme/
2002-02-06  Marcus Brinkmann  <marcus@g10code.de>

	* wait.c (gpgme_wait): Add new argument STATUS, in which the
	status of the returned context is returned.
	(_gpgme_wait_on_condition): Rework the function a bit, to make it
	aware of cancelled processes, and to allow to use gpgme_wait with
	CTX being NULL (as documented in the source).
	(struct proc_s): New member REPORTED.
	* gpgme.h: Fix prototype.
	* verify.c (gpgme_op_verify): Fix use of gpgme_wait.
	* sign.c (gpgme_op_sign):
	* import.c (gpgme_op_import):
	* genkey.c (gpgme_op_genkey):
	* export.c (gpgme_op_export):
	* encrypt.c (gpgme_op_encrypt):
	* delete.c (gpgme_op_delete):
	* decrypt-verify.c (gpgme_op_decrypt_verify):
2002-02-06 01:20:49 +00:00
Marcus Brinkmann
4fa3008950 doc/
2002-02-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Key Listing Mode): Update documentation.

gpgme/
2002-02-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.c (gpgme_set_keylist_mode): Possibly return an error
	value.
	(gpgme_get_keylist_mode): New function.
	(gpgme_new): Set the default for keylist_mode member of CTX.

	* gpgme.h (gpgme_set_keylist_mode): Fix prototype.
	(gpgme_get_keylist_mode): New prototype.
	(GPGME_KEYLIST_MODE_LOCAL): New macro.
	(GPGME_KEYLIST_MODE_EXTERN): Likewise..
2002-02-06 00:08:47 +00:00
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
Marcus Brinkmann
92bbc39616 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (MOSTLYCLEANFILES): New variable.
2002-02-01 20:28:59 +00:00
Marcus Brinkmann
f40bc63ac9 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (EXTRA_gpgme_openpgp_la_SOURCES): New variable.
	(EXTRA_gpgme_smime_la_SOURCES): Likewise.

	* gpgmeplug.c (passphrase_cb): Fix type of third argument.
2002-02-01 20:28:35 +00:00
Marcus Brinkmann
c38622cebf Update to latest version. 2002-02-01 19:54:25 +00:00
Marcus Brinkmann
3139e2b91a 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (gpgsm_status_handler): At error, terminate the
	connection to the server.
2002-02-01 18:10:19 +00:00
Marcus Brinkmann
ebd6ac7b7d Really add this file. 2002-01-31 15:27:49 +00:00
Marcus Brinkmann
129da707d1 doc/
2002-01-31  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Generating Keys): Document error at creation
	failure.

gpgme/
2002-01-31  Marcus Brinkmann  <marcus@g10code.de>

	* rungpg.h: Add STATUS_KEY_CREATED.

	* progress.c: New file.
	* Makefile.am (libgpgme_la_SOURCES): Add progress.c.

	* genkey.c (genkey_status_handler): Use
	_gpgme_progress_status_handler.  Add check for status.
	(struct genkey_result_s): New structure.
	(_gpgme_release_genkey_result): New function.
	(gpgme_op_genkey): Check for error.
	* gpgme.c (_gpgme_release_result): Call
	_gpgme_release_genkey_result.
	* ops.h (_gpgme_release_genkey_result): Add prototype.
	* types.h (GenKeyResult): New type.
	* context.h (gpgme_context_s): Add GenKeyResult to member result.
2002-01-31 00:31:44 +00:00
Marcus Brinkmann
ca5e3a09e3 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Deleting Keys): Document new error values.
2002-01-30 22:48:09 +00:00
Marcus Brinkmann
9f622905cc 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.c (_gpgme_release_result): Call
	_gpgme_release_delete_result.
	* ops.h (_gpgme_release_delete_result): Add prototype.
	* types.h (DeleteResult): New type.
	* context.h (gpgme_context_s): Add DeleteResult to member result.

	* delete.c (enum delete_problem): New type.
	(struct delete_result_s): New structure.
	(_gpgme_release_delete_result): New function.
	(delete_status_handler): Implement more status codes.
	(gpgme_op_delete): Return error on failure.

	* import.c (MAX_IMPORTED_FIELDS): Bump up to 14.
2002-01-30 22:45:22 +00:00
Marcus Brinkmann
088c044792 doc/
2002-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Importing Keys): Add reference to gpgme_get_op_info.

gpgme/
2002-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* import.c (struct import_result_s): New structure.
	(_gpgme_release_import_result): New function.
	(append_xml_impinfo): Likewise.
	(import_status_handler): Implement.
	* gpgme.c (_gpgme_release_result): Add call to
	_gpgme_release_import_result.
	* ops.h (_gpgme_release_impoer_result): Add prototype.
	* types.h (ImportResult): New type.
	* context.h (gpgme_context_s): Add ImportResult to member result.

	* encrypt.c (gpgme_op_encrypt): Code clean up.

tests/
2002-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-import.c (print_op_info): New function.
	(main): Use it.
2002-01-30 21:52:32 +00:00
Marcus Brinkmann
1677f80d7e Be a bit clearer. 2002-01-30 01:47:29 +00:00
Marcus Brinkmann
648db71744 2002-01-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi: Some spell checking.
2002-01-30 01:43:05 +00:00
Marcus Brinkmann
843c3f4b78 Add more about status handler. 2002-01-30 01:21:55 +00:00
Marcus Brinkmann
785991aa9a doc/
2002-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi: Add all the gpgme_op_*_start functions.
	Fill the concept index with many, many entries.

gpgme/
2002-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h: Add lots of comment and fix the formatting.  Add
	gpgme_trustlist_end prototype.
2002-01-30 01:17:30 +00:00
Marcus Brinkmann
89dd219f8d Add copyright year. 2002-01-29 22:59:15 +00:00
Marcus Brinkmann
1513ffd323 doc/
2002-01-29  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Run Control): New section.
	(Verify): Docuent gpgme_get_notation.
	(More Information): New section describing gpgme_get_op_info.

gpgme/
2002-01-29  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h: Add new type GpgmeIdleFunc.  Change type of
	gpgme_register_idle to return and accept this type.
	* wait.c (gpgme_register_idle): Fix type.
	Save and return old value of idle_function.
2002-01-29 22:58:25 +00:00
Werner Koch
1c0317ca79 * engine-gpgsm.c (_gpgme_gpgsm_op_keylist): Implement secret only mode.
* keylist.c (keylist_colon_handler): Add support for the new "crs"
record type.
2002-01-29 10:04:41 +00:00
Marcus Brinkmann
a5329adab7 Delete obsolete item. 2002-01-22 18:14:33 +00:00
Marcus Brinkmann
14fe216277 Some small updates. 2002-01-22 16:55:58 +00:00
Marcus Brinkmann
498ba7818c 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* engine-gpgsm.c (_gpgme_gpgsm_release): Call assuan_disconnect,
	not assuan_pipe_disconnect.

	* Makefile.am (libgpgme_la_LIBADD): Change to link assuan and
	jnlib (needed by assuan) statically into libgpgme.  Linking a
	static library into a shared library this way is not portable.
2002-01-22 16:36:08 +00:00
Marcus Brinkmann
4da57b04cb 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (HAVE_JNLIB_LOGGING): Define always for assuan.
2002-01-22 16:34:52 +00:00
Marcus Brinkmann
b863cea7d7 Update to current version in newpg module. 2002-01-22 16:29:12 +00:00