Commit Graph

83 Commits

Author SHA1 Message Date
Marcus Brinkmann
588c16d324 doc/
2003-04-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Encrypting a Plaintext): Add info about
	GpgmeEncryptResult and gpgme_op_encrypt_result.

gpgme/
2003-04-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (GpgmeEncryptResult): New data type.
	(gpgme_op_encrypt_result): New prototype.
	* ops.h (_gpgme_op_encrypt_init_result): New prototype.
	(_gpgme_op_encrypt_status_handler): Fix prototype.
	* encrypt-sign.c (_gpgme_op_encrypt_sign_start): Call
	_gpgme_op_encrypt_init_result.
	* encrypt.c: Do not include <stdio.h>, <assert.h>, "util.h" and
	"wait.h".  Include <errno.h> and "gpgme.h".
	(SKIP_TOKEN_OR_RETURN): Remove macro.
	(struct encrypt_result): Rename to ...
	(op_data_t): ... new data type.  Rewrite for user result data.
	(append_xml_encinfo): Remove function.
	(release_op_data): New function.
	(gpgme_op_encrypt_result): New function.
	(_gpgme_op_encrypt_status_handler): Change first argument to void *.
	Rewrite result parsing.
	(_gpgme_op_encrypt_sym_status_handler): Change first argument to
	void *.
	(_gpgme_op_encrypt_init_result): New function.
	(_gpgme_op_encrypt_start): Rename to ...
	(encrypt_start): ... this.
	(gpgme_op_encrypt_start): Use encrypt_start, not
	gpgme_op_encrypt_start.
	(gpgme_op_encrypt): Likewise.

tests/
2003-04-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-sign.c: Rewritten.
	* gpgsm/t-sign.c: Rewritten.
	* gpg/t-encrypt.c: Check for invalid recipients.
	* gpgsm/t-encrypt.c: Likewise.
2003-04-27 22:24:37 +00:00
Marcus Brinkmann
2971894b27 doc/
2003-04-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Creating a Signature): Add info about
	GpgmeNewSignature, GpgmeSignResult and gpgme_op_sign_result.
	(Crypto Operations): Add GpgmeInvalidUserID.
	(Algorithms): New chapter.

gpgme/
2003-04-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (GpgmePubKeyAlgo, GpgmeHashAlgo, GpgmeInvalidUserID,
	GpgmeNewSignature, GpgmeSignResult): New data types.
	(gpgme_op_sign_result, gpgme_pubkey_algo_name,
	gpgme_hash_algo_name): New prototypes.
	* gpgme.c (gpgme_pubkey_algo_name): New function.
	(gpgme_hash_algo_name): Likewise.
	* ops.h (_gpgme_parse_inv_userid, _gpgme_op_sign_init_result): New
	prototype.
	(_gpgme_op_sign_status_handler): Fix prototype.
	* op-support.c: Include <errno.h> and <string.h>.
	(_gpgme_parse_inv_userid): New function.
	* sign.c: Include <errno.h> and "gpgme.h", but not <stdio.h>,
	<assert.h> and "util.h".
	(SKIP_TOKEN_OR_RETURN): Remove macro.
	(struct sign_result): Change to op_data_t type and rework it.
	(release_sign_result): Rename to ...
	(release_op_data): ... this and rewrite it.
	(append_xml_info): Remove function.
	(gpgme_op_sign_result): New function.
	(parse_sig_created): New function.
	(_gpgme_sign_status_handler): Change first argument to void *.
	Rewrite the function to use the new result structure and functions.
	(_gpgme_op_sign_init_result): New function.
	(_gpgme_op_sign_start): Rename to ...
	(sign_start): ... this.  Call _gpgme_op_sign_init_result.
	(gpgme_op_sign_start): Use sign_start instead _gpgme_op_sign_start.
	(gpgme_op_sign): Likewise.
2003-04-27 20:53:04 +00:00
Marcus Brinkmann
2ffb03a969 doc/
2003-04-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Deleting Keys): Document
	GPGME_Ambiguous_Specification.
	(Error Values): Remove GPGME_Invalid_Type and GPGME_Invalid_Mode.
	Add GPGME_Unknown_Reason, GPGME_Not_Found,
	GPGME_Ambiguous_Specification, GPGME_Wrong_Key_Usage,
	GPGME_Key_Revoked, GPGME_Key_Expired, GPGME_No_CRL_Known,
	GPGME_CRL_Too_Old, GPGME_Policy_Mismatch, GPGME_No_Secret_Key,
	GPGME_Key_Not_Trusted, GPGME_Issuer_Missing, GPGME_Chain_Too_Long,
	GPGME_Unsupported_Algorithm, GPGME_Sig_Expired,
	GPGME_Bad_Signature, GPGME_No_Public_Key.

gpgme/
2003-04-27  Marcus Brinkmann  <marcus@g10code.de>

	* delete.c: Include <errno.h> and "gpgme.h", but not "util.h" or
	"key.h".
	(enum delete_problem): Move into function delete_status_handler.
	(delete_status_handler): Change first argument to void *.  Parse
	delete problem with strtol instead atoi.  Return better error
	values.
	(_gpgme_op_delete_start): Rename to ...
	(delete_start): ... this.  Rework error handling.
	(gpgme_op_delete_start): Use delete_start instead
	_gpgme_op_delete_start.
	(gpgme_op_delete): Likewise.
	* gpgme.h (GpgmeDataType): Removed.
2003-04-27 17:35:42 +00:00
Marcus Brinkmann
ffa2b2158c doc/
2003-04-25  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Importing Keys): Change GPGME_IMPORT_PRIVATE to
	GPGME_IMPORT_SECRET.

gpgme/
2003-04-25  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h: Change GPGME_IMPORT_PRIVATE to GPGME_IMPORT_SECRET.
	* import.c (parse_import_res): Parse unchanged field.

tests/
2003-04-25  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-import.c: Rewritten.
2003-04-25 17:08:00 +00:00
Marcus Brinkmann
d99f1faa17 2003-04-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Importing Keys): Remove note about gpgme_get_op_info.
	(Detailed Results): Remove note about import.
2003-04-25 16:11:25 +00:00
Marcus Brinkmann
8cfb3cdd07 doc/
2003-04-25  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Importing Keys): Add documentation for
	GpgmeImportStatus, GpgmeImportResult and gpgme_op_import_result.

gpgme/
2003-04-25  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h: New enum for GPGME_IMPORT_NEW, GPGME_IMPORT_UID,
	GPGME_IMPORT_SIG, GPGME_IMPORT_SUBKEY, GPGME_IMPORT_PRIVATE.
	(GpgmeError): GPGME_Unknown_Reason, GPGME_Not_Found,
	GPGME_Ambiguous_Specification, GPGME_Wrong_Key_Usage,
	GPGME_Key_Revoked, GPGME_Key_Expired, GPGME_No_CRL_Known,
	GPGME_CRL_Too_Old, GPGME_Policy_Mismatch, GPGME_No_Secret_Key,
	GPGME_Key_Not_Trusted, GPGME_Issuer_Missing, GPGME_Chain_Too_Long,
	GPGME_Unsupported_Algorithm, GPGME_Sig_Expired,
	GPGME_Bad_Signature, GPGME_No_Public_Key): New error codes.
	(struct _gpgme_import_status): New structure.
	(GpgmeImportStatus): New type.
	(struct _gpgme_op_import_result): New structure.
	(GpgmeImportResult): New type.
	(gpgme_op_import_result): New function.
	* import.c: Include <errno.h> and "gpgme.h", but not "util.h".
	(struct import_result): Change to type op_data_t.
	(release_import_result): Rename to ...
	(release_op_data): ... this.
	(append_xml_impinfo): Function removed.
	(gpgme_op_import_result): New function.
	(parse_import): New function.
	(parse_import_res): Likewise.
	(import_status_handler): Change first argument to void *.  Rewrite
	to use new functions.
	(_gpgme_op_import_start): Rework error handling.
2003-04-25 15:56:24 +00:00
Marcus Brinkmann
a6c92323b6 2003-04-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Generating Keys): Fix documentation of ppublic and
	secret arguments.
2003-04-25 12:48:48 +00:00
Marcus Brinkmann
671edce1ae doc/
2003-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Generating Keys): Document changed gpgme_op_genkey
	and new gpgme_op_genkey_result function.  Document
	GpgmeGenKeyResult data type.

gpgme/
2003-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (struct _gpgme_op_genkey_result): New structure.
	(GpgmeGenKeyResult): New type.
	(gpgme_op_genkey): Drop last argument.
	(gpgme_op_genkey_result): New function.
	* genkey.c: Do not include "util.h", but "gpgme.h".
	(struct genkey_result): Replace with ...
	(op_data_t): ... this new type.
	(release_genkey_result): Replace with ...
	(release_op_data): ... this new function.
	(gpgme_op_genkey_result): New function.
	(genkey_status_handler): Rewritten using new op_data_t type.
	(get_key_parameter): New function.
	(_gpgme_op_genkey_start): Renamed to
	(genkey_start): ... this and rewritten.
	(gpgme_op_genkey_start): Use genkey_start instead
	_gpgme_op_genkey_start.
	(gpgme_op_genkey): Rewritten.  Remove FPR argument.

tests/
2003-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-genkey.c: Rewritten to match new semantics.
2003-04-24 17:16:28 +00:00
Marcus Brinkmann
8208786b91 doc/
2003-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Error Values): Rename GPGME_No_Passphrase to
	GPGME_Bad_Passphrase.
	* gpgme.texi (Decrypt): Likewise.
	(Decrypt and Verify): Likewise.
	(Creating a Signature): Likewise.
	(Encrypting a Plaintext): Likewise.

	* gpgme.texi (Error Values): Rename GPGME_No_Recipients to
	GPGME_No_UserID and GPGME_Invalid_Recipient to
	GPGME_Invalid_UserID.
	(Encrypting a Plaintext): Likewise.

	* gpgme.texi (Error Values): Remove GPGME_Busy and GPGME_No_Request.
	(Listing Keys): Likewise.
	(Listing Trust Items): Likewise.

gpgme/
2003-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (GpgmeError): Rename GPGME_No_Passphrase to
	GPGME_Bad_Passphrase.
	* passphrase.c (_gpgme_passphrase_status_handler): Use
	GPGME_Bad_Passphrase instead GPGME_No_Passphrase.

	* gpgme.h (GpgmeError): Rename GPGME_No_Recipients to
	GPGME_No_UserID and GPGME_Invalid_Recipient to
	GPGME_Invalid_UserID.
	* encrypt.c (_gpgme_encrypt_status_handler): Use GPGME_No_UserID
	instead GPGME_No_Recipients and GPGME_Invalid_UserID instead
	GPGME_Invalid_Recipient.
	(_gpgme_op_encrypt_start): Likewise.

	* gpgme.h (GpgmeError): Remove GPGME_Busy and GPGME_No_Request.
	* wait-user.c (_gpgme_wait_user_event_cb): Don't clear CTX->pending.
	* wait-private.c (_gpgme_wait_private_event_cb): Likewise.
	* wait-global.c (gpgme_wait): Likewise.
	* verify.c (_gpgme_op_verify_start): Likewise.
	(gpgme_get_sig_status): Don't check pending flag.
	(gpgme_get_sig_string_attr): Likewise.
	(gpgme_get_sig_ulong_attr): Likewise.
	(gpgme_get_sig_key): Likewise.
	* op-support.c (_gpgme_op_reset): Likewise.
	* trustlist.c (gpgme_op_trustlist_start): Don't clear pending flag.
	(gpgme_op_trustlist_next): Don't check or clear pending flag.
	(gpgme_op_trustlist_end): Likewise.
	* sign.c (_gpgme_op_sign_start): Likewise.
	* context.h (struct gpgme_context_s): Remove member PENDING.
	* decrypt.c (_gpgme_decrypt_start): Likewise.
	* delete.c (_gpgme_op_delete_start): Likewise.
	* edit.c (_gpgme_op_edit_start): Likewise.
	* encrypt.c (_gpgme_op_encrypt_start): Likewise.
	* encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
	* export.c (_gpgme_op_export_start): Likewise.
	* genkey.c (_gpgme_op_genkey_start): Likewise.
	* import.c (_gpgme_op_import_start): Likewise.
	* key.c (gpgme_get_key): Likewise.
	* keylist.c (gpgme_op_keylist_start): Likewise.
	(gpgme_op_keylist_ext_start): Likewise.
	(gpgme_op_keylist_next): Likewise.
	(gpgme_op_keylist_end): Likewise.
	* data-compat.c (gpgme_error_to_errno): Don't convert EBUSY.
2003-04-24 14:33:13 +00:00
Marcus Brinkmann
54cd78dbec Fix last change. 2003-02-07 01:15:08 +00:00
Marcus Brinkmann
5a37051361 doc/
2003-02-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Cancelling an Operation): Removed.
	(Passphrase Callback): Document new type for GpgmePassphraseCb.

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

	* gpgme.h (GpgmePassphraseCb): Change type to return GpgmeError,
	and add argument for returning the result string.
	(gpgme_cancel): Remove prototype.
	* gpgme.c (gpgme_cancel): Remove function.
	* context.h (struct gpgme_context_s): Remove member cancel.
	* passphrase.c (_gpgme_passphrase_command_handler): Call the
	passphrase callback in the new way.

tests/
2003-02-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-decrypt.c (passphrase_cb): Fix to new prototype.
	* gpg/t-decrypt-verify.c (passphrase_cb): Likewise.
	* gpg/t-edit.c (passphrase_cb): Likewise.
	* gpg/t-encrypt-sign.c (passphrase_cb): Likewise.
	* gpg/t-encrypt-sym.c (passphrase_cb): Likewise.
	* gpg/t-sign.c (passphrase_cb): Likewise.
	* gpg/t-signers.c (passphrase_cb): Likewise.
2003-02-06 20:09:24 +00:00
Marcus Brinkmann
d102681aef doc/
2003-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Engine Information): Rename member part to
	file_name.

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

	* engine-backend.h (struct engine_ops): Rename get_path to
	get_file_name.
	* gpgme.h (struct _gpgme_engine_info): Rename member path to
	file_name.
	* version.c: Do not include <stdio.h>, <stdlib.h>, context.h and
	util.h.  Other clean ups.
	(parse_version_number): Protect more seriously against
	overflow.
	(gpgme_get_engine_info): Move to ...
	* engine.c (gpgme_get_engine_info): ... here.
	(_gpgme_engine_get_info): Function removed.
	(_gpgme_engine_get_path): Make static and rename to ...
	(engine_get_file_name): .. this.
	(_gpgme_engine_get_version): Make static and rename to ...
	(engine_get_version): ... this.
	(_gpgme_engine_get_req_version): Make static and rename to ...
	(engine_get_req_version): ... this.
	* engine.h (_gpgme_engine_get_path, _gpgme_engine_get_version,
	_gpgme_engine_req_version, _gpgme_engine_get_info.): Remove
	prototypes.

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

	* t-engine-info.c: Use file_name instead path throughout.
2003-01-30 13:11:25 +00:00
Marcus Brinkmann
feb78b25ec 2003-01-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Protocols and Engines): Document
	gpgme_get_protocol_name.
2003-01-30 12:01:21 +00:00
Marcus Brinkmann
fdbee6b211 doc/
2003-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Engine Information): Rewritten.

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

	* gpgme.h (enum GpgmeProtocol): Remove GPGME_PROTOCOL_AUTO.
	* gpgme.c (gpgme_set_protocol): Don't handle GPGME_PROTOCOL_AUTO.
	(gpgme_get_protocol_name): New function.

	* engine-backend.h (struct engine_ops): New member
	get_req_version, remove member check_version.
	* engine.h (_gpgme_Engine_get_version): New prototype.
	* rungpg.c (gpg_get_req_version): New function.
	(gpg_check_version): Function removed.
	(_gpgme_engine_ops_gpg): Add gpg_get_req_version, remove
	gpg_check_version.
	* engine-gpgsm.c (gpgsm_get_req_version): New function.
	(gpgsm_check_version): Function removed.
	(_gpgme_engine_ops_gpgsm): Add gpgsm_get_req_version, remove
	gpgsm_check_version.
	* engine.c: Include ops.h.
	 (_gpgme_engine_get_req_version): New function.
	(gpgme_engine_check_version): Rewritten.
	* version.c (gpgme_get_engine_info): Rewritten.
	* gpgme.h (gpgme_engine_info): New structure.
	(GpgmeEngineInfo): New type.

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

	* Makefile.am (TESTS): Add t-engine-info.
	* t-engine-info.c: New file.
	* gpg/t-encrypt.c (main): Don't print engine info.
	* gpg/t-eventloop.c (main): Likewise.
	* gpg/t-encrypt-sign.c (main): Likewise.
	* gpgsm/t-encrypt.c (main): Likewise.
2003-01-30 11:54:23 +00:00
Marcus Brinkmann
2c543f6a86 doc/
2003-01-29  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (I/O Callback Interface): Document new even
	GPGME_EVENT_START.
	(Waiting For Completion): Document new possible return values.
	(I/O Callback Interface): Document return type of GpgmeIOCb.

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

	* context.h (gpgme_context_s): Remove member ERROR.
	* types.h (GpgmeStatusHandler): Change return type to GpgmeError.
	(GpgmeCommandHandler): Change return type to GpgmeError and add
	new argument RESULT.
	* gpgme.h (GpgmeIOCb): Change return type to GpgmeError.
	(GpgmeEventIO): New event GPGME_EVENT_START.
	(GpgmeIdleFunc): Remove type.
	(gpgme_register_idle): Remove prototype.
	* data.c: Include <assert.h>.
	(_gpgme_data_inbound_handler): Change return type to GpgmeError.
	Return any error instead ignoring it, don't close file descriptor
	on error.
	(_gpgme_data_outbound_handler): Likewise.
	* decrypt.c: Do not include <stdio.h>, <string.h> and <assert.h>.
	(_gpgme_decrypt_status_handler): Change return type to GpgmeError.
	Return error instead setting ctx->error.  Return success at end of
	function.
	(gpgme_op_decrypt): Don't work around the old kludge anymore.
	* decrypt-verify.c (decrypt_verify_status_handler): Change return
	type to GpgmeError.  Return possible errors.
	* delete.c: Do not include <stdio.h>, <string.h>, <time.h> and
	<assert.h>.
	(delete_status_handler): Change return type to GpgmeError.  Return
	error instead setting ctx->error.  Return success at end of
	function.
	* edit.c: Do not include <stdio.h> and <string.h>.
	(_gpgme_edit_status_handler): Change type to GpgmeError,
	make static and rename to ...
	(edit_status_handler): ... this.  Return error directly.
	(command_handler): Change return type to GpgmeError, add result
	argument.  Return error directly.
	* encrypt.c (status_handler_finish): Remove function.
	(_gpgme_encrypt_status_handler): Change return type to GpgmeError.
	Return error directly.
	(_gpgme_encrypt_sym_status_handler): Likewise.
	* encrypt-sign.c (encrypt_sign_status_handler): Likewise.
	* engine-gpgsm.c (close_notify_handler): Do not signal done event
	anymore.
	(status_handler): Change return type to GpgmeError.  Diddle things
	around a bit to return errors directly.
	(start): Send start event.
	* export.c: Do not include <stdio.h>, <string.h> and <assert.h>.
	(export_status_handler): Change return type to GpgmeError.  Don't
	check ctx->error.
	* genkey.c: Do not include <stdio.h> and <assert.h>.
	(genkey_status_handler): Change return type to GpgmeError.  Don't
	check ctx->error.  Return errors directly.
	* gpgme.c (_gpgme_release_result): Do not initialize ctx->error.
	(_gpgme_op_event_cb): Function removed.
	(_gpgme_op_event_cb_user): Likewise.
	* import.c: Do not include <stdio.h>, <string.h> and <assert.h>.
	(import_status_handler): Change return type to GpgmeError.  Don't
	check ctx->error.
	* keylist.c (keylist_colon_handler, keylist_status_handler, finish_key):
	Change return type to GpgmeError, return error directly.
	* Makefile (libgpgme_la_SOURCES): Add wait-global.c,
	wait-private.c and wait-user.c
	* ops.h (test_and_allocate_result): Return error instead setting
	ctx->error.
	(_gpgme_data_inbound_handler, _gpgme_data_outbound_handler,
	_gpgme_verify_status_handler, _gpgme_decrypt_status_handler,
	_gpgme_sign_status_handler, _gpgme_encrypt_staus_handler,
	_gpgme_passphrase_status_handler, _gpgme_progress_status_handler):
	Change return type to GpgmeError.
	(_gpgme_passphease_command_handler): Change return type to
	GpgmeError and add new argument RESULT.
	* op-support.c: Use new callback functions, and change private
	data to ctx everywhere.
	* passphrase.c (_gpgme_passphrase_status_handler): Change return
	type to GpgmeError, return error directly.
	(_gpgme_passphrase_command_handler): Change return type to
	GpgmeError, add result argument.  Return results accordingly.
	* progress.c (_gpgme_progress_status_handler): Change return type
	to GpgmeError, return errors directly.
	* rungpg.c (status_handler): Change return type to GpgmeError.
	Return error directly.
	(close_notify_handler): Don't send done event.
	(colon_line_handler): Change return type to GpgmeError, return
	errors directly.
	* rungpg.c (start): Send start event.
	* sign.c (_gpgme_sign_status_handler): Change return type to
	GpgmeError, return errors directly.
	* trustlist.c (trustlist_status_handler): Change return type to
	GpgmeError.  Return 0.
	(trustlist_colon_handler): Change return type GpgmeError.  Return
	errors directly.
	* verify.c (add_notation): Change return type to GpgmeError,
	return errors directly.
	(_gpgme_verify_status_handler): Likewise.
	* wait.h (struct fd_table): Remove lock member.
	(struct wait_item_s): Moved here from wait.c.
	(struct tag): New structure.
	(_gpgme_wait_event_cb): Remove prototype.
	(_gpgme_wait_private_event_cb, _gpgme_wait_global_event_cb,
	_gpgme_wait_user_add_io_cb, _gpgme_wait_user_remove_io_cb,
	_gpgme_wait_user_event_io_cb): New prototypes.
	* wait.c: Don't include <stdio.h>.
	(ftd_global, ctx_done_list, ctx_done_list_size,
	ctx_done_list_length, ctx_done_list_lock, idle_function): Remove
	global variable.
	(gpgme_register_idle, do_select, _gpgme_wait_event_cb): Remove
	function.
	(gpgme_wait): Move to file wait-global.c.
	(_gpgme_add_io_cb): Take ctx as private argument, initialize ctx
	member in wait item and tag.
	(_gpgme_remove_io_cb): Take ctx from tag.  Don't use FDT lock.
	(_gpgme_wait_one, _gpgme_wait_on_condition): Move to
	wait-private.c.
	(gpgme_fd_table_init): Don't initialize FDT->lock.
	(gpgme_fd_table_deinit): Don't destroy FDT->lock.
	(_gpgme_fd_table_put): Make static and rename to ...
	(fd_table_put): ... this function.  Don't use FDT->lock.
	(struct wait_item_s): Move to wait.h.
	* wait-global.c: New file.
	* wait-private.c: New file.
	* wait-user.c: New file.
2003-01-29 15:20:58 +00:00
Marcus Brinkmann
b6e5bb310e doc/
2002-12-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Verify): Drop R_STAT argument in gpgme_op_verify.
	* gpgme.texi (Decrypt and Verify): Likewise for
	gpgme_op_decrypt_verify.

gpgme/
2002-12-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (gpgme_op_verify, gpgme_op_decrypt_verify): Drop R_STAT
	argument.
	* decrypt-verify.c (gpgme_op_decrypt_verify): Drop R_STAT
	argument.
	* verify.c (gpgme_op_verify): Drop R_STAT argument.
	(_gpgme_intersect_stati): Function removed.
	* ops.h (_gpgme_intersect_stati): Remove prototype.

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

	* gpgsm/t-verify.c (main): Adjust caller of gpgme_op_verify.
	* gpg/t-verify.c (main): Likewise.
	* gpg/t-decrypt-verify.c (main): Likewise for
	gpgme_op_decrypt_verify.
2002-12-24 13:08:56 +00:00
Marcus Brinkmann
06afcd13c6 doc/
2002-12-23  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Information About Keys): Document that
	GPGME_ATTR_IS_SECRET is not representable as a string anymore.
2002-12-23 22:34:25 +00:00
Marcus Brinkmann
9d8143f071 2002-12-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Signatures): New section.
	(Listing Keys): Add gpgme_get_key.
2002-12-23 17:12:48 +00:00
Marcus Brinkmann
0f78cb1e66 Fix bugs in last change. 2002-12-06 22:27:12 +00:00
Marcus Brinkmann
6a772bd6bc doc/
2002-12-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Memory Based Data Buffers): New subsection.
	(File Based Data Buffers): Likewise.
	(Callback Based Data Buffers): Likewise.
	(Manipulating Data Buffers): Update interfaces.  Add
	gpgme_data_seek.
	* gpgme.texi (Engine Version Check): Remove gpgme_chec_engine.

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

	* data.h (gpgme_data_release_cb): Change return type to void.
	(gpgme_data_read_cb): Change return type to ssize_t.
	* data.c (gpgme_data_read): Likewise.
	* data-stream.c (stream_read): Likewise.
	* data-fd.c (fd_read): Likewise.
	* data-mem.c (mem_read): Likewise.
	(mem_release): Change return type to void.
	* data-user.c (user_read): Change return type to ssize_t.
	(user_release): Change return type to void.
	* data-compat.c (old_user_read): Change return type to ssize_t.
	* gpgme.h (GpgmeDataReadCb): Likewise.
	(gpgme_data_read): Likewise.
	(GpgmeDataSeekCb): Change return type to off_t.
2002-12-06 22:06:25 +00:00
Marcus Brinkmann
8f0283d81a 2002-11-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Document the new interface.
2002-11-21 13:45:00 +00:00
Marcus Brinkmann
dfc32a5441 doc/
2002-11-19  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Generating Keys): Document new argument to
	gpgme_op_genkey.

gpgme/
2002-11-19  Marcus Brinkmann  <marcus@g10code.de>

	* genkey.c: Only include <config.h> if [HAVE_CONFIG_H].
	(struct genkey_result_s): Add new member FPR.
	(_gpgme_release_genkey_result): Free RESULT->fpr if set.
	(genkey_status_handler): Extract the fingerprint from the status
	line.
	(gpgme_op_genkey): Add new argument FPR and return the fingerprint
	in it.
	* gpgme.h: Adjust prototype of gpgme_op_genkey.

tests/
2002-11-19  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-genkey.c (main): Add missing argument to gpgme_op_genkey
	invocation.
CVSk: ----------------------------------------------------------------------
2002-11-19 16:41:17 +00:00
Marcus Brinkmann
21c8829f6a 2002-11-05 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Fix prototype of gpgme_get_sig_key.
	Reported by Miguel Coca <e970095@zipi.fi.upm.es>.
2002-11-05 15:25:07 +00:00
Marcus Brinkmann
6f9f516830 2002-08-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Selecting Signers): Fix reference count.
2002-08-30 11:37:59 +00:00
Marcus Brinkmann
49216a0360 2002-08-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Header): Document name space.
2002-08-20 23:25:49 +00:00
Marcus Brinkmann
a01ee915e1 2002-08-20 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Importing Keys): Undocument EOF.
2002-08-20 15:44:48 +00:00
Marcus Brinkmann
bfbe265613 doc/
2002-08-20  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Importing Keys): Document gpgme_op_import_ext.

gpgme/
2002-08-20  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h: Add prototype for gpgme_op_import_ext.
	* import.c (struct import_result_s): New member `nr_considered'.
	Rename `any_imported' to `nr_imported'.
	(import_status_handler): Increment nr_imported.  Set nr_considered
	if appropriate.
	(gpgme_op_import_ext): New function.
	(gpgme_op_import): Implement in terms of gpgme_op_import_ext.
2002-08-20 13:38:40 +00:00
Werner Koch
c79fa94260 * gpgme.texi (Information About Keys): Changed GPGME_ATTR_TYPE. 2002-08-14 13:57:59 +00:00
Marcus Brinkmann
ab0e8fb5e4 2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Deleting Keys): Say that secret keys might not be
	deleted.
2002-07-25 18:50:23 +00:00
Marcus Brinkmann
46f61064e6 2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Manipulating Data Buffers): Mention that backend
	tries to detect encoding automatically.
2002-07-25 15:52:23 +00:00
Marcus Brinkmann
fd6d91581b 2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Information About Keys): Document (badly) the new
	key attributes.
2002-07-25 15:50:46 +00:00
Marcus Brinkmann
ea0acccf2b 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.
2002-07-03 02:22:38 +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
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
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
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
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
Werner Koch
6b89172051 * 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.
2002-06-11 15:33:08 +00:00
Marcus Brinkmann
e202b91008 2002-06-04 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Document new autodetection.
2002-06-04 12:12:08 +00:00
Marcus Brinkmann
4df073b733 2002-06-04 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (DISTCLEANFILES): New variable.
2002-06-04 10:56:33 +00:00
Marcus Brinkmann
3d05bb406b 2002-05-26 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi: Some typographical correctons throughout.
2002-05-26 20:12:51 +00:00
Marcus Brinkmann
0ab2c2918a 2002-05-09 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Using Automake): New section.
2002-05-09 06:49:40 +00:00
Marcus Brinkmann
d9e73425b9 2002-05-09 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Escape { and }.
2002-05-09 03:39:18 +00:00
Marcus Brinkmann
4e0d4d7cf3 doc/
2002-05-09  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Overview): Replace note about thread-safeness.
	(Multi Threading): New section.

gpgme/
2002-05-08  Marcus Brinkmann  <marcus@g10code.de>

	* w32-util.c: New static variable GET_PATH_LOCK.
	(_gpgme_get_gpg_path): Remove superfluous NULL initializer.
	Take lock while determining path.
	(_gpgme_get_gpgsm_path): Likewise.
	* version.c (do_subsystem_inits): Set DONE to 1 after
	initialization.
	(gpgme_get_engine_info): New variable ENGINE_INFO_LOCK.  Take lock
	while determining engine info.
	* rungpg.c (_gpgme_gpg_get_version): New variable
	GPG_VERSION_LOCK.  Take the lock while determining the program
	version.
	* posix-io.c: Include "sema.h".
	(_gpgme_io_spawn): New variable FIXED_SIGNALS_LOCK.  Take the lock
	while fixing the signals.
	(_gpgme_io_select): Make READFDS and WRITEFDS non-static.
	* key.c: Include "sema.h".  New globals KEY_CACHE_LOCK and
	KEY_REF_LOCK.
	(capabilities_to_string): Make STRINGS very const.
	(_gpgme_key_cache_add): Lock the key cache.
	(_gpgme_key_cache_get): Likewise.
	(gpgme_key_ref, gpgme_key_release): Lock the key_ref_lock.
	* import.c (append_xml_impinfo): Make IMPORTED_FIELDS and
	IMPORT_RES_FIELDS very const.  Make FIELD and FIELD_NAME a litle
	const.
	* engine.c (_gpgme_engine_get_info): New variable
	ENGINE_INFO_LOCK.  Take lock while determining engine info.
	* engine-gpgsm.c: Include "sema.h".
	(_gpgme_gpgsm_get_version): New variable GPGSM_VERSION_LOCK.  Take
	lock while getting program version.
2002-05-09 03:38:12 +00:00
Werner Koch
afd58b644c * gpgme.texi (Manipulating Data Buffers): Changed some data types
to void*.
(Protocol Selection): Added gpgme_get_protocol.
(Verify): Updated to include the new attribute fucntions and
status codes.
2002-05-03 18:20:24 +00:00
Werner Koch
6c4d6748f6 * gpgme.texi (Manipulating Data Buffers): New type GpgmeDataEncoding. 2002-04-27 12:17:56 +00:00
Marcus Brinkmann
09635ef2e6 doc/
2002-04-23  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Passphrase Callback): Document that either return
	argument can be NULL.
	(Progress Meter Callback): Likewise.

gpgme/
2002-04-23  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.c (gpgme_get_progress_cb): Allow either return parameter
	to be NULL.
	(gpgme_get_passphrase_cb): Likewise.
2002-04-22 22:06:09 +00:00
Marcus Brinkmann
025866092e doc/
2002-04-22  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Passphrase Callback): Fix small typo.  Document the
	new function gpgme_get_passphrase_cb.
	(Progress Meter Callback): Document the new function
	gpgme_get_progress_cb.

gpgme/
2002-04-22  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.c (gpgme_get_passphrase_cb): New function.
	(gpgme_get_progress_cb): New function.
	* gpgme.h: Add new prototypes for gpgme_get_passphrase_cb and
	gpgme_get_progress_cb.
2002-04-22 21:58:26 +00:00
Marcus Brinkmann
7cb3972a1a 2002-04-16 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Creating a Signature): Fix function name.  Reported
	by Wichert Ackerman <wichert@debian.org>.

2002-03-29  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (direntry): End index entry with a full stop.
	Patch submitted by Jose Carlos Garcia Sogo <jsogo@debian.org>.
2002-04-16 12:24:02 +00:00
Marcus Brinkmann
5a24e01ee8 2002-03-17 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Detailed Results): Fix syntax error in last change.
2002-03-18 00:01:51 +00:00