2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Decrypt): Add note about new field wrong_key_usage
of gpgme_decrypt_result_t.
gpgme/
2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_decrypt_result): New fields
wrong_key_usage and _unused.
* decrypt.c (_gpgme_decrypt_status_handler): Don't skip over
character after a matched string, as in a protocol error this
could skip over the trailing binary zero.
Handle decrypt.keyusage error notifications.
2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Add note about new field
keylist_mode of gpgme_key_t.
gpgme/
2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_key): New member keylist_mode.
* keylist.c (keylist_colon_handler): Set the keylist_mode of KEY.
* configure.ac: Bumbed LT_Revision; now at C12/A1/R1.
(NEED_GPGSM_VERSION): Set to 1.9.3.
* sign.c: Include util.h for prototype of _gpgme_parse_timestamp.
* gpg/t-keylist-sig.c (main): Temporary disabled one test due top
gpg 1.3.4 problems.
* gpg/t-import.c (check_result): Likewise.
*configure.ac (AM_PATH_GPG_ERROR): Require 0.3.
assuan/
See README.1st.
gpgme/
2003-08-19 Marcus Brinkmann <marcus@g10code.de>
The ath files (ath.h, ath.c, ath-pth.c, ath-pthread.c,
ath-compat.c, ath-pth-compat.c and ath-pthread-compat.c) have been
updated to have better thread support, and the Makefile.am was
changed to reflect that.
* util.h [!HAVE_FOPENCOOKIE]: Remove fopencookie declaration.
* engine-gpgsm.c (gpgsm_assuan_simple_command): Set ERR to return
value of status_fnc.
* rungpg.c (start): Return SAVED_ERRNO, not errno.
2003-05-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Passphrase Callback): Document new prototype.
gpgme/
2003-05-26 Marcus Brinkmann <marcus@g10code.de>
* engine.h (EngineCommandHandler): Change last argument to int fd.
* gpgme.h (gpgme_passphrase_cb_t): Rewritten to take parts of the
description and fd.
(gpgme_edit_cb_t): Change last argument to int fd.
* ops.h (_gpgme_passphrase_command_handler_internal): New prototype.
* passphrase.c: Include <assert.h>.
(op_data_t): Rename userid_hint to uid_hint, remove last_pw_handle.
(release_op_data): Check values before calling free.
(_gpgme_passphrase_status_handler): Likewise.
(_gpgme_passphrase_command_handler_internal): New function.
(_gpgme_passphrase_command_handler): Rewritten.
* edit.c (edit_status_handler): Pass -1 as fd argument.
(command_handler): Update prototype. New variable processed. Use
it to store return value of
_gpgme_passphrase_command_handler_internal which is now used
instead _gpgme_passphrase_command_handler. Use it also to check
if we should call the user's edit function. Pass fd to user's
edit function.
* rungpg.c (struct gpg_object_s): Change type of cmd.cb_data to
void *.
(gpg_release): Check value before calling free. Do not release
cmd.cb_data.
(command_cb): Function removed.
(command_handler): New function. Thus we don't use a data object
for command handler stuff anymore, but handle it directly. This
allows proper error reporting (cancel of passphrase requests, for
example). Also all callbacks work via direct writes to the file
descriptor (so that passphrases are not kept in insecure memory).
(gpg_set_command_handler): Rewritten to use even more ugly hacks.
(read_status): Check cmd.keyword before calling free. Install
command_handler as the I/O callback handler with GPG as private
data.
tests/
2003-05-27 Marcus Brinkmann <marcus@g10code.de>
* (t-decrypt-verify.c, t-decrypt.c, t-edit.c, t-encrypt-sign.c,
t-encrypt-sym.c, t-sign.c, t-signers.c): Include <unistd.h>.
(passphrase_cb): Rewritten.
* t-edit.c (edit_fnc): Rewritten.
In all files, replace the Gpgme* type names with the new gpgme_*
type names.
doc/
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Header): Remove Gpgme as namespace prefix. Add
_GPGME to namespace prefix.
* gpgme.texi (Multi Threading): Add note about link order.
gpgme/
2003-05-18 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h: The following types are renamed. The old name is kept
as a deprecated typedef.
(GpgmeCtx): Rename to gpgme_ctx_t.
(GpgmeData): Rename to gpgme_data_t.
(GpgmeRecipients): Rename to gpgme_recipients_t.
(GpgmeError): Rename to gpgme_error_t.
(GpgmeDataEncoding): Rename to gpgme_data_encoding_t.
(GpgmePubKeyAlgo): Rename to gpgme_pubkey_algo_t.
(GpgmeHashAlgo): Rename to gpgme_hash_algo_t.
(GpgmeSigStat): Rename to gpgme_sig_stat_t.
(GpgmeSigMode): Rename to gpgme_sig_mode_t.
(GpgmeAttr): Rename to gpgme_attr_t.
(GpgmeValidity): Rename to gpgme_validity_t.
(GpgmeProtocol): Rename to gpgme_protocol_t.
(GpgmeStatusCode): Rename to gpgme_status_code_t.
(GpgmeEngineInfo): Rename to gpgme_engine_info_t.
(GpgmeSubkey): Rename to gpgme_subkey_t.
(GpgmeKeySig): Rename to gpgme_keysig_t.
(GpgmeUserID): Rename to gpgme_user_id_t.
(GpgmePassphraseCb): Rename to gpgme_passphrase_cb_t.
(GpgmeProgressCb): Rename to gpgme_progress_cb_t.
(GpgmeEditCb): Rename to gpgme_edit_cb_t.
(GpgmeIOCb): Rename to gpgme_io_cb_t.
(GpgmeRegisterIOCb): Rename to gpgme_register_io_cb_t.
(GpgmeRemoveIOCb): Rename to gpgme_remove_io_cb_t.
(GpgmeEventIO): Rename to gpgme_event_io_t.
(GpgmeEventIOCb): Rename to gpgme_event_io_cb_t.
(GpgmeIOCbs): Rename to gpgme_io_cbs.
(gpgme_io_cbs_t): New type.
(GpgmeDataReadCb): Rename to gpgme_data_read_cb_t.
(GpgmeDataWriteCb): Rename to gpgme_data_write_cb_t.
(GpgmeDataSeekCb): Rename to gpgme_data_seek_cb_t.
(GpgmeDataReleaseCb): Rename to gpgme_data_release_cb_t.
(GpgmeDataCbs): Rename to gpgme_data_cbs.
(gpgme_data_cbs_t): New type.
(GpgmeInvalidUserID): Rename to gpgme_invalid_user_id_t.
(GpgmeEncryptResult): Rename to gpgme_encrypt_result_t.
(GpgmeDecryptResult): Rename to gpgme_decrypt_result_t.
(GpgmeNewSignature): Rename to gpgme_new_signature_t.
(GpgmeSignResult): Rename to gpgme_sign_result_t.
(GpgmeSigNotation): Rename to gpgme_sig_notation_t.
(GpgmeSignature): Rename to gpgme_signature_t.
(GpgmeVerifyResult): Rename to gpgme_verify_result_t.
(GpgmeImportStatus): Rename to gpgme_import_status_t.
(GpgmeImportResult): Rename to gpgme_import_result_t.
(GpgmeGenKeyResult): Rename to gpgme_genkey_result_t.
(GpgmeKeyListResult): Rename to gpgme_keylist_result_t.
(GpgmeTrustItem): Rename to gpgme_trust_item_t.
* gpgme.h (gpgme_deprecated_error_t): New type, swallowing macros
GPGME_No_Recipients, GPGME_Invalid_Recipient and
GPGME_No_Passphrase.
* data.h (struct gpgme_data_s): Rename to struct gpgme_data.
* context.h (struct gpgme_context_s): Rename to struct
gpgme_context.
(struct gpgme_recipients_s): Rename to gpgme_recipients.
2003-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Rewritten to take into account new and
deprecated functions and data types.
gpgme/
2003-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_sig_notation): New structure.
(GpgmeSigNotation): New type.
(struct _gpgme_signature): New structure.
(GpgmeSignature): New type.
(struct _gpgme_op_verify_result): New structure.
(GpgmeVerifyResult): New type.
(gpgme_op_verify_result): New prototype.
(gpgme_get_notation): Remove prototype.
* ops.h (_gpgme_op_verify_init_result): New prototype.
(_gpgme_verify_status_handler): Change first argument to void *.
* util.h (_gpgme_decode_percent_string, _gpgme_map_gnupg_error):
New prototypes.
* conversion.c (_gpgme_decode_percent_string): New function.
(gnupg_errors): New static global.
(_gpgme_map_gnupg_error): New function.
* gpgme.c (gpgme_release): Don't release CTX->notation.
(gpgme_get_notation): Remove function.
* decrypt-verify.c (_gpgme_op_decrypt_verify_start): Call
_gpgme_op_verify_init_result.
* verify.c: Do not include <stdio.h>, <assert.h> and "key.h", but
do include "gpgme.h".
(struct verify_result): Replace with ...
(op_data_t): ... this type.
(release_verify_result): Remove function.
(release_op_data): New function.
(is_token): Remove function.
(skip_token): Remove function.
(copy_token): Remove function.
(gpgme_op_verify_result): New function.
(calc_sig_summary): Rewritten.
(finish_sig): Remove function.
(parse_new_sig): New function.
(parse_valid_sig): New function.
(parse_notation): New function.
(parse_trust): New function.
(parse_error): New function.
(_gpgme_verify_status_handler): Rewritten. Change first argument
to void *.
(_gpgme_op_verify_start): Rework error handling. Call
_gpgme_op_verify_init_result.
(gpgme_op_verify): Do not release or clear CTX->notation.
(gpgme_get_sig_status): Rewritten.
(gpgme_get_sig_string_attr): Likewise.
(gpgme_get_sig_ulong_attr): Likewise.
(gpgme_get_sig_key): Likewise.
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-10-08 Marcus Brinkmann <marcus@g10code.de>
New data object component:
* gpgme.h (GpgmeDataReadCb, GpgmeDataWriteCb, GpgmeDataSeekCb,
GpgmeDataReleaseCb): New types.
(struct GpgmeDataCbs): New structure.
(gpgme_data_read): Changed prototype to match that of read() closely.
(gpgme_data_write): Similar for write().
(gpgme_data_seek, gpgme_data_new_from_cbs, gpgme_data_new_from_fd,
gpgme_data_new_from_stream): New prototypes.
(gpgme_data_get_type, gpgme_check_engine): Prototype removed.
* Makefile.am (libgpgme_la_SOURCES): Add data.h, data-fd.c,
data-stream.c, data-mem.c, data-user.c and data-compat.c.
* data.c: Reimplemented from scratch.
* (data-compat.c, data-fd.c, data.h, data-mem.c, data-stream.c,
data-user.c): New file.
* context.h (struct gpgme_data_s): Removed.
* conversion.c: Include <errno.h> and <sys/types.h>.
(_gpgme_data_append): New function.
* data.c (_gpgme_data_append_string): Move to ...
* conversion.c (_gpgme_data_append_string): ... here.
* data.c (_gpgme_data_append_for_xml): Move to ...
* conversion.c (_gpgme_data_append_for_xml): ... here.
* data.c (_gpgme_data_append_string_for_xml): Move to ...
* conversion.c (_gpgme_data_append_string_for_xml): ... here.
* data.c (_gpgme_data_append_percentstring_for_xml): Move to ...
* conversion.c (_gpgme_data_append_percentstring_for_xml): ... here.
* ops.h (_gpgme_data_get_mode, _gpgme_data_set_mode): Prototype
removed.
* types.h (GpgmeDataMode): Type removed.
* decrypt.c (_gpgme_decrypt_start): Don't check data type or mode.
* edit.c (_gpgme_op_edit_start): Likewise.
* encrypt.c (_gpgme_op_encrypt_start): Likewise.
* encrypt-sign.c (_gpgme_op_encrypt_sign_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.
* sign.c (_gpgme_op_sign_start): Likewise.
* verify.c (_gpgme_op_verify_start): Likewise.
* encrypt.c (gpgme_op_encrypt): Remove hack that returns invalid
no recipient if no data was returned.
* encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
no recipient if no data was returned.
* encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
no recipient if no data was returned.
* engine.c (_gpgme_engine_op_verify): Add new argument to
differentiate detached from normal signatures.
* engine.h (_gpgme_engine_op_verify): Likewise for prototype.
* engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise. Don't check
mode of data argument.
* engine-gpgsm.h (_gpgme_gpgsm_op_verify): Likewise for prototype.
* gpgme.h (gpgme_op_verify_start): Likewise for prototype.
(gpgme_op_verify): Likewise for prototype.
* rungpg.c (_gpgme_gpg_op_verify): Likewise.
* rungpg.h (_gpgme_gpg_op_verify): Likewise for prototype.
* verify.c (_gpgme_op_verify_start): Likewise.
(gpgme_op_verify_start): Likewise.
(gpgme_op_verify): Likewise.
* rungpg.c (struct arg_and_data_s): New member INBOUND to hold
direction of data object.
(_gpgme_gpg_add_data): Add new argument INBOUND. Use it to
determine direction of data object.
(_gpgme_gpg_add_pm_data, _gpgme_gpg_set_command_handler,
_gpgme_gpg_op_decrypt, _gpgme_gpg_op_edit, _gpgme_gpg_op_encrypt,
_gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
_gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_sign,
_gpgme_gpg_op_verify): Add new argument to _gpgme_gpg_add_data
invocation.
(build_argv): Use new member INBOUND to determine direction of
file descriptor. Don't check the data type.
* rungpg.h (_gpgme_gpg_add_data): Add new argument to prototype.
* gpgme.c (gpgme_get_op_info): Don't call
_gpgme_data_get_as_string if CTX->op_info is NULL.
* version.c (gpgme_check_engine): Function removed.
tests/
2002-10-09 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-decrypt.c (print_data): Update to new gpgme_data_read
interface, and use gpgme_engine_check_version instead
gpgme_check_version.
* gpg/t-decrypt-verify.c (print_data): Likewise.
* gpg/t-edit.c (main): Likewise.
* gpg/t-encrypt.c (print_data): Likewise.
* gpg/t-encrypt-sign.c (print_data): Likewise.
* gpg/t-encrypt-sym.c (print_data): Likewise.
* gpg/t-eventloop.c (print_data): Likewise.
* gpg/t-export.c (print_data): Likewise.
* gpg/t-sign.c (print_data): Likewise.
* gpg/t-signers.c (print_data): Likewise.
* gpgsm/t-decrypt.c (print_data): Likewise.
* gpgsm/t-encrypt.c (print_data): Likewise.
* gpgsm/t-export.c (print_data): Likewise.
* gpgsm/t-sign.c (print_data): Likewise.
* gpg/t-verify.c (main): Likewise for gpgme_op_verify.
* gpgsm/t-verify.c (main): Likewise for gpgme_op_verify.
* t-data.c (read_once_test): Likewise.
(write_test): Update for new behaviour of data objects.
(main): Remove type test.