* configure.ac (NEED__FILE_OFFSET_BITS): Change to define gpgme_off_t
and gpgme_ssize_t.
(API__OFF_T, API__SSIZE_T): New ac_subst.
* src/gpgme.h.in: Replace all ssize_t and off_t by ac_subst macros.
* src/assuan-support.c, src/ath-pthread.c, src/ath.c, src/ath.h
* src/data-compat.c, src/data-fd.c, src/data-mem.c, src/data-stream.c
* src/data-user.c, src/data.c, src/data.h, src/engine-gpgsm.c
* src/engine-uiserver.c, src/gpgme-tool.c, src/gpgme.c: Replace off_t
by gpgme_off_t and sszie_t by gpgme_ssize_t.
* src/ath-pthread.c, src/ath.h: Include gpgme.h.
--
For a detailed description, see the gpgme.texi diff.
* src/gpgme.c (gpgme_io_read): New.
--
This is a writen style variant for gpgme_io_write. It is often easier
to use this one in passphrase and edit callbacks.
* src/gpgme.c (gpgme_set_global_flag): New.
* src/gpgme.h.in (gpgme_set_global_flag): New.
* src/gpgme.def, src/libgpgme.vers: Add new public function.
* src/debug.c (envvar_override): New.:
(_gpgme_debug_set_debug_envvar): New.
(debug_init): Take ENVVAR_OVERRIDE in account.
--
On Android envvars can't be used, thus we need another way to enable
GPGME debugging. The new function allows this and may be used in the
future to implement similar things.
* build-aux/gitlog-to-changelog: New script. Taken from gnulib.
* build-aux/git-log-fix: New file.
* build-aux/git-log-footer: New file.
* build-aux/git-hook/commit-msg: New script.
* doc/HACKING: New file.
* ChangeLog: New file.
* Makefile.am (EXTRA_DIST): Add new files.
(gen-ChangeLog): New.
(dist-hook): Run gen-ChangeLog.
* autogen.sh: Install commit-msg hook for git.
Rename all ChangeLog files to ChangeLog-2011.
2009-06-16 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Result Management): New section.
src/
2009-06-16 Marcus Brinkmann <marcus@g10code.de>
* gpgme.c (result_ref_lock): New global variable.
(gpgme_result_ref, gpgme_result_unref): use it.
2009-05-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Library Version Check): Document selftest error.
(Creating Contexts): Likewise.
src/
2009-05-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h.in (gpgme_check_version_internal): New prototype.
(gpgme_check_version): New macro, overriding function of the same
name.
* libgpgme.vers, gpgme.def: Add gpgme_check_version_internal.o
* context.h (_gpgme_selftest): New variable declaration.
* version.c: Include "context.h".
(gpgme_check_version): Set _gpgme_selftest on success.
(gpgme_check_version_internal): New function.
* gpgme.c (_gpgme_selftest): Define it.
(gpgme_new): Check the selftest result.
2009-05-18 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Encrypting a Plaintext): Document
GPGME_ENCRYPT_NO_ENCRYPT_TO.
src/
2009-05-18 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h.in (gpgme_encrypt_flags_t): Add
GPGME_ENCRYPT_NO_ENCRYPT_TO.
* engine-gpg.c (gpg_encrypt): Pass --no-encrypt-to to gpg if
GPGME_ENCRYPT_NO_ENCRYPT_TO flag is set.
2008-03-11 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (File Based Data Buffers): Document the need for
blocking operations.
(Callback Based Data Buffers): Likewise.
gpgme/
2008-03-11 Marcus Brinkmann <marcus@g10code.de>
* data.c (gpgme_data_read, gpgme_data_write): Retry on EINTR.
2006-09-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Destroying Data Buffers): Clarify that
gpgme_data_release_and_get_mem destroys DH unconditionally.
gpgme/
2006-09-25 Marcus Brinkmann <marcus@g10code.de>
* data-mem.c (gpgme_data_release_and_get_mem): Release the data
object properly.
2005-03-24 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Library Version Check): Make example code compatible
to W32 systems.
gpgme/
2005-03-24 Marcus Brinkmann <marcus@g10code.de>
* gpgme.c (gpgme_set_locale): Remove conditional on
HAVE_W32_SYSTEM, and just check for LC_MESSAGES.
2005-10-02 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Add the new member notations of
gpgme_sig_key_t.
(Key Listing Mode): Document GPGME_KEYLIST_MODE_SIG_NOTATIONS.
gpgme/
2005-10-02 Marcus Brinkmann <marcus@g10code.de>
* util.h (_gpgme_decode_percent_string): Add new argument BINARY
to prototype.
* verify.c (parse_notation): Likewise for invocation.
* conversion.c (_gpgme_decode_percent_string): Likewise to
declaration. If set, do not replace '\0' characters with a
printable string.
* gpgme.h (struct _gpgme_key_sig): New field notations.
* ops.h (_gpgme_parse_notation): New prototype.
* sig-notation.c (_gpgme_parse_notation): New function.
* key.c (gpgme_key_unref): Free all signature notations.
* keylist.c (op_data_t): New member tmp_keysig.
(finish_key): Clear OPD->tmp_keysig.
* gpgme.c (gpgme_set_keylist_mode): Remove check.
* rungpg.c (gpg_keylist): Support listing signature notations.
(gpg_keylist_ext): Likewise.
2005-10-01 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Signature Notation Data): New section.
(Verify): Added more about the notation data structure.
gpgme/
2005-10-01 Marcus Brinkmann <marcus@g10code.de>
* gpgme.def: Add gpgme_data_set_file_name,
gpgme_data_get_file_name, gpgme_sig_notation_clear,
gpgme_sig_notation_add and gpgme_sig_notation_get.
* libgpgme.vers: Add gpgme_sig_notation_clear,
gpgme_sig_notation_add and gpgme_sig_notation_get.
* Makefile.am (libgpgme_real_la_SOURCES): Add sig-notation.c.
* context.h (struct gpgme_context): New field sig_notations.
* gpgme.h (struct _gpgme_sig_notation): New member value_len and
critical.
(GPGME_SIG_NOTATION_CRITICAL): New symbol.
(gpgme_sig_notation_flags_t): New type.
(gpgme_sig_notation_add, gpgme_sig_notation_clear,
gpgme_sig_notation_get): New prototypes.
* ops.h (_gpgme_sig_notation_create, _gpgme_sig_notation_free):
New prototypes.
* sig-notation.c (_gpgme_sig_notation_free): New file.
* verify.c (parse_notation): Use support functions.
(release_op_data): Likewise.
* rungpg.c (append_args_from_sig_notations): New function.
(gpg_encrypt_sign, gpg_sign): Call it.
tests/
2005-10-01 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (TESTS): Add t-sig-notation.
* gpg/t-sig-notation.c (check_result): New file.
* gpg/t-verify.c (check_result): Also check the length of the
notation data.
* gpg/gpg.conf: New file.
2005-06-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Add information about new fields in
gpgme_signature_t.
gpgme/
2005-06-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_signature): New members pubkey_algo and
hash_algo.
* verify.c (parse_valid_sig): Parse pubkey and hash algo numbers.
(parse_new_sig): Parse pubkey, hash algo and timestamp for ERRSIG.
2005-06-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Decrypt): Add gpgme_recipient_t.
gpgme/
2005-06-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_recipient): New structure.
(gpgme_recipient_t): New type.
(struct _gpgme_op_decrypt_result): Add member recipients.
* decrypt.c (op_data_t): New member last_recipient_p.
(_gpgme_op_decrypt_init_result): Initialize last_recipient_p.
(parse_enc_to): New function.
(_gpgme_decrypt_status_handler): Handle status ENC_TO and
NO_SECKEY.
2005-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Included Certificates): Document
GPGME_INCLUDE_CERTS_DEFAULT.
gpgme/
2005-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (GPGME_INCLUDE_CERTS_DEFAULT): New macro.
* engine-gpgsm.c (gpgsm_sign): Send the include-certs option after
the reset, just for cleanliness, and do not sent it at all if the
default is requested.
* gpgme.c (gpgme_set_include_certs): Allow to use
GPGME_INCLUDE_CERTS_DEFAULT.
* README: Refer to COPYING.LESSER and "each file" instead of
COPYING.
* COPYING.LESSER: New file.
* gpgme.spec.in (%doc): Add COPYING.LESSER.
* acinclude.m4, configure.ac, Makefile.am: Change license to LGPL
2.1 or later.
* TODO: Add copyright notice.
* README.CVS: Likewise.
assuan/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* README.1st: Add copyright notice.
doc/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am: Change license to LGPL.
(gpgme_TEXINFOS): Replace gpl.texi with lesser.texi.
* gpgme.texi: Change license to LGPL (also for documentation of
GPGME's license).
* lesser.texi: New file.
* gpl.texi: File removed.
gpgme/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* putc_unlocked.c, funopen.c: I just claim copyright on these
files and change their license to LGPL, because they are totally
trivial wrapper functions.
* isascii.c: Change copyright notice to the one from ctype/ctype.h
in the GNU C Library (CVS Head 2004-10-10), where isascii is
defined as a macro doing exactly the same as the function in this
file.
* memrchr.c: Update from the GNU C Library (CVS Head 2001-07-06).
* stpcpy.c: Update from the GNU C Library (CVS Head 2004-10-10).
* ath.c, ath-compat.c, ath.h, ath-pth.c, ath-pth-compat.c,
ath-pthread.c, ath-pthread-compat.c, context.h, conversion.c,
data.c, data-compat.c, data-fd.c, data.h, data-mem.c,
data-stream.c, data-user.c, debug.c, debug.h, decrypt.c,
decrypt-verify.c, delete.c, edit.c, encrypt.c, encrypt-sign.c,
engine-backend.h, engine.c, engine-gpgsm.c, engine.h, error.c,
export.c, genkey.c, get-env.c, gpgme.c, gpgme.h, import.c, io.h,
key.c, keylist.c, mkstatus, Makefile.am, ops.h, op-support.c,
passphrase.c, posix-io.c, posix-sema.c, posix-util.c, progress.c,
rungpg.c, sema.h, sign.c, signers.c, trust-item.c, trustlist.c,
util.h, verify.c, version.c, w32-io.c, w32-sema.c, w32-util.c,
wait.c, wait-global.c, wait.h, wait-private.c, wait-user.c: Change
license to LGPL.
tests/
2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* gpg/mkdemodirs: Add copyright notice.
* gpgsm/Makefile.am, gpgsm/t-support.h, gpgsm/t-decrypt.c,
gpgsm/t-encrypt.c, gpgsm/t-export.c, gpgsm/t-genkey.c,
gpgsm/t-import.c, gpgsm/t-keylist.c, gpgsm/t-sign.c,
gpgsm/t-verify.c, gpg/Makefile.am, gpg/t-decrypt.c,
gpg/t-decrypt-verify.c, gpg/t-edit.c, gpg/t-encrypt.c,
gpg/t-encrypt-sign.c, gpg/t-encrypt-sym.c, gpg/t-eventloop.c,
gpg/t-export.c, gpg/t-genkey.c, gpg/t-import.c, gpg/t-keylist.c,
gpg/t-keylist-sig.c, gpg/t-sign.c, gpg/t-signers.c,
gpg/t-support.h, gpg/t-thread1.c, gpg/t-trustlist.c,
gpg/t-verify.c, Makefile.am, t-data.c, t-engine-info.c,
t-version.c: Change license to LGPL.
2004-09-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Change type of keylist_mode in
gpgme_key_t to gpgme_keylist_mode_t.
gpgme/
2004-09-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (GPGME_IMPORT_NEW, GPGME_IMPORT_UID, GPGME_IMPORT_SIG,
GPGME_IMPORT_SUBKEY, GPGME_IMPORT_SECRET,
(GPGME_KEYLIST_MODE_LOCAL, GPGME_KEYLIST_MODERN_EXTERN,
GPGME_KEYLIST_MODE_SIGS, GPGME_KEYLIST_MODE_VALIDATE): Change from
enum to macros.
(gpgme_keylist_mode_t): Define as unsigned int.
(gpgme_key_t): Change type of keylist_mode to
gpgme_keylist_mode_t.
* gpgme.texi (Decrypt and Verify): Document the NO_DATA error
code.
(Verify): Document the relationship between gpgme_op_verify_result
and the decrypt and verify operations.
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.
2004-02-24 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (cancellation): New section.
gpgme/
2004-02-24 Marcus Brinkmann <marcus@g10code.de>
* gpgme.c (gpgme_cancel): New function.
* engine-backend.h (struct engine_ops): New member cancel.
* engine.h (_gpgme_engine_cancel): New prototype.
* engine.c (_gpgme_engine_cancel): New function.
* engine-gpgsm.c: Add new member cancel.
(gpgsm_cancel): New function.
(gpgsm_release): Use it.
* rungpg.c: Add new member cancel.
2003-12-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Rename member class in
gpgme_key_sig_t to sig_class.
(Creating a Signature): Likewise for gpgme_signature_t.
gpgme/
2003-12-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (_GPGME_D_CLASS): Revert this change.
(struct _gpgme_key_sig): For C++ compilers, rename class
member to _obsolete_class. Add new member sig_class.
(struct _gpgme_new_signature): Same here.
* key.c (gpgme_key_sig_get_ulong_attr): Use CERTSIG->sig_class,
not CERTSIG->class.
* keylist.c (keylist_colon_handler): Likewise for KEYSIG, but keep
setting KEYSIG->class, too. Rename variable CLASS to SIG_CLASS.
* sign.c (parse_sig_created): Set SIG->sig_class.
2003-10-06 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Signal Handling): New section.
gpgme/
2003-10-06 Marcus Brinkmann <marcus@g10code.de>
* io.h (_gpgme_io_subsystem_init): New prototype.
* posix-io.c (_gpgme_io_subsystem_init): Add function.
(_gpgme_io_spawn): Do not fixup signal handler here.
* version.c (do_subsystem_inits): Call _gpgme_io_subsystem_init.
tests/
2003-10-06 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-thread1.c (thread_one): Do not call initialize_gpgme.
Likewise.
2003-08-14 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Creating a Signature): Change type of member class
to unsigned int.
gpgme/
2003-08-14 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_new_signature): Rename member CLASS to
_OBSOLETE_CLASS, add member CLASS with type unsigned int.
* sign.c (parse_sig_created): Also set SIG->_unused_class for
backward compatibility.
tests/
2003-08-14 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-sign.c (check_result): Change output format for signature
class to unsigned int.
2003-08-04 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Get error code from SIG->status in the code
for gpgme_get_sig_status.
gpgme/
2003-08-04 Marcus Brinkmann <marcus@g10code.de>
* verify.c (parse_new_sig): Fix status parsing case.
2003-07-31 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Listing Keys): Document GPG_ERR_AMBIGUOUS_NAME for
gpgme_get_key.
gpgme/
2003-07-31 Marcus Brinkmann <marcus@g10code.de>
* keylist.c (gpgme_get_key): Check if there is more than one key
listed, and return GPG_ERR_AMBIGUOUS_NAME in that case.
* gpgme.texi (Encrypting a Plaintext): Bad passphrase is only
possible with symmetric encryption, change the wording to reflect
that.
* gpgme.texi (Creating a Signature): Document
GPG_ERR_UNUSABLE_SECKEY.
* gpgme.texi (Key Listing Mode): Remove word duplication.
(Listing Keys): Remove mentioning of force argument.
(Verify): Don't mention r_stat. Fix some typos.
(Decrypt and Verify): Correct info how to get the result. Don't
mention r_stat.
(Manipulating Data Buffers): Fix documentation of return value.
(Listing Keys): Update examples.
(Decrypt): Result might also be available when operation failed.
(Verify): Result might also be available when operation failed.
All spotted by St�phane Corth�sy.
* gpgme.texi (Key Management): Clarify difference between can_sign
and can_certify.
(Information About Keys): Likewise for GPGME_ATTR_CAN_SIGN and
GPGME_ATTR_CAN_CERTIFY.
2003-05-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Exporting Keys): Change and document prototypes.
Add new gpgme_op_export_ext and gpgme_op_export_ext_start
variants.
(Selecting Recipients): Section removed.
(Encrypting a Plaintext): Change prototypes and document the
changes.
gpgme/
2003-05-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (gpgme_op_export_start): Change second arg to const char *.
(gpgme_op_export): Likewise.
(gpgme_op_export_ext_start): New prototype.
(gpgme_op_export_ext): Likewise.
* engine.h: Likewise for _gpgme_engine_op_export and
_gpgme_engine_op_export_ext.
* engine-backend.h (struct engine_ops): Change second argument of
prototype of export to const char *, and add reserverd int as
third argument. Add prototype for export_ext.
* engine.c (_gpgme_engine_op_export_ext): New function.
(_gpgme_engine_op_export): Change second argument of prototype of
export to const char *, and add reserverd int as third argument.
* rungpg.c (gpg_export): Change second argument of prototype of
export to const char *, and add reserverd int as third argument.
(gpg_export_ext): New function.
(gpg_keylist_ext): Break loop at error.
(_gpgme_engine_ops_gpg): Add gpg_export_ext.
* engine-gpgsm.c (gpgsm_export): Change second argument of
prototype of export to const char *, and add reserverd int as
third argument.
(gpgsm_export_ext): New function.
(_gpgme_engine_ops_gpgsm): Add gpgsm_export_ext.
* export.c (export_start): Change second argument of prototype of
export to const char *, and add reserverd int as third argument.
(gpgme_op_export_start): Likewise.
(export_ext_start): New function.
(gpgme_op_export_ext_start): Likewise.
(gpgme_op_export_ext): Likewise.
* gpgme.h (gpgme_keylist_mode_t): New type for anonymous enum.
(gpgme_sigsum_t): New type for anonymous enum.
* encrypt-sign.c (encrypt_sign_start): Check for errors earlier,
and return an error if RECP is not set.
* Makefile.am (libgpgme_la_SOURCES): Remove user-id.c.
* user-id.c: Remove file.
* ops.h: Remove prototype for _gpgme_user_ids_all_valid.
* gpgme.h (gpgme_encrypt_flags_t): New type.
(gpgme_op_encrypt_start): Change second parameter to type
gpgme_key_t[], and add third parameter.
(gpgme_op_encrypt): Likewise.
(gpgme_op_encrypt_sign_start): Likewise.
(gpgme_op_encrypt_sign): Likewise.
* encrypt.c (encrypt_start): Likewise.
(gpgme_op_encrypt_start): Likewise.
(gpgme_op_encrypt): Likewise. Pass flags to engine.
* encrypt-sign.c (encrypt_sign_start): Likewise.
(gpgme_op_encrypt_sign_start): Likewise.
(gpgme_op_encrypt_sign): Likewise.
* engine-backend.h (struct engine_ops): Likewise for prototypes of
encrypt and encrypt_sign.
* engine.h: Likewise for prototypes of _gpgme_engine_op_encrypt
and _gpgme_engine_op_encrypt_sign.
* engine.c (_gpgme_engine_op_encrypt): Likewise.
(_gpgme_engine_op_encrypt_sign): Likewise.
* rungpg.c (gpg_encrypt): Likewise.
(gpg_encrypt_sign): Likewise.
* rungpg.c (gpg_encrypt): Check flags for always trust option.
* engine-gpgsm.c (gpgsm_encrypt): Likewise.
(set_recipients): Rewritten to use keys instead user IDs.
* rungpg.c (append_args_from_recipients): Rewritten to use keys
instead user IDs.
* encrypt.c (_gpgme_encrypt_status_handler): Change errors
returned to GPGME_Invalid_Key and GPGME_General_Error.
tests/
2003-05-29 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-encrypt-sym.c (main): Adapt to new syntax.
* gpg/t-encrypt.c (main): Likewise.
* gpg/t-eventloop.c (main): Likewise.
* gpg/t-encrypt-sign.c (main): Likewise.
* gpgsm/t-export.c (main): Likewise.
* gpgsm/t-encrypt.c (main): Likewise.
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-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Listing Mode): Add GPGME_KEYLIST_MODE_SIGS.
(Manipulating Keys): Add obsoleteness note.
(Key Signatures): Likewise.
(Information About Keys): Likewise.
(Key Management): Add new data types GpgmeSubkey, GpgmeKeySig,
GpgmeUserID, and all the information about GpgmeKey.
gpgme/
2003-04-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_key): New structure.
(GpgmeKey): Define using _gpgme_key.
(struct _gpgme_subkey): New structure.
(GpgmeSubKey): New type.
(struct _gpgme_key_sig): New structure.
(GpgmeKeySig): New type.
(struct _gpgme_user_id): New structure.
(GpgmeUserID): New type.
(struct _gpgme_op_keylist_result): New structure.
(GpgmeKeyListResult): New type.
(gpgme_op_keylist_result): New function.
(gpgme_key_get_as_xml): Remove prototype.
* context.h (struct gpgme_context_s): Remove members tmp_key,
tmp_uid, key_cond and key_queue.
(struct key_queue_item_s): Remove structure.
(struct user_id_s): Remove structure.
(struct gpgme_recipients_s): Replace with simple
GpgmeUserID list.
* gpgme.c (gpgme_release): Do not release CTX->tmp_key.
* ops.h (_gpgme_key_add_subkey, _gpgme_key_append_name,
_gpgme_key_add_sig, _gpgme_trust_item_new): New prototypes.
* rungpg.c (command_cb): Return GpgmeError instead int.
New variable ERR. Use it to hold return value of cmd handler.
(gpg_delete): Access fingerprint of key directly.
(append_args_from_signers): Likewise.
(gpg_edit): Likewise.
(append_args_from_recipients): Use GpgmeUserID for recipient list.
* engine-gpgsm.c: Do not include "key.h".
(gpgsm_delete): Access fingerprint of key directly.
(gpgsm_sign): Likewise.
(set_recipients): Use GpgmeUserID for recipients. Invert invalid
user ID flag.
* key.h: File removed.
* key.c: Completely reworked to use exposed GpgmeKey data types.
* keylist.c: Likewise.
* recipient.c: Completely reworked to use GpgmeUserID.
tests/
2003-04-30 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-keylist.c: Rewritten.
* gpgsm/t-keylist.c (main): Rewritten.
* gpg/t-edit.c (main): Do not use gpgme_key_get_as_xml. Use
gpgme_key_unref instead gpgme_key_release.
* gpg/t-signers.c (main): Use gpgme_key_unref instead
gpgme_key_release.
2003-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Trust Item Management): Add data members of
GpgmeTrustItem type.
(Information About Trust Items): Add note about obsoleteness.
(Manipulating Trust Items): Add gpgme_trust_item_ref and
gpgme_trust_item_unref.
gpgme/
2003-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_trust_item): New structure.
(GpgmeTrustItem): New type.
(gpgme_trust_item_ref, gpgme_trust_item_unref): New prototypes.
* context.h (struct trust_queue_item_s): Remove structure.
(struct gpgme_context_s): Remove trust_queue member.
* Makefile.am (libgpgme_la_SOURCES): Add trust-item.c.
* trust-item.c: New file.
* trustlist.c: Do not include <stdio.h> or <time.h>, but
"gpgme.h".
(struct trust_queue_item_s): Change to new type op_data_t.
(trust_status_handler): Change first argument to void *.
(trust_colon_handler): Likewise.
(_gpgme_op_trustlist_event_cb): Use op_data_t type.
(gpgme_op_trustlist_start): Use op_data_t and rework error
handling.
(gpgme_op_trustlist_next): Use op_data_t.
(gpgme_trust_item_release): Remove function.
(gpgme_trust_item_get_string_attr): Likewise.
(gpgme_trust_item_get_int_attr): Likewise.
tests/
2003-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-trustlist.c: Rewritten.
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.
2003-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Decrypt): Descript gpgme_op_decrypt_result and
GpgmeDecryptResult.
gpgme
2003-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (struct _gpgme_op_decrypt_result): New structure.
(GpgmeDecryptResult): New type.
(gpgme_op_decrypt_result): New prototype.
* ops.h (_gpgme_op_decrypt_init_result): New prototype.
(_gpgme_decrypt_status_handler): Fix prototype.
(_gpgme_decrypt_start): Remove prototype.
* decrypt-verify.c: Do not include <stdio.h>, <stdlib.h>,
<string.h> and <assert.h>, "util.h" and "context.h", but
"gpgme.h".
(decrypt_verify_status_handler): Change first argument to void *,
and rework error handling.
(_gpgme_op_decrypt_verify_start): New function.
(gpgme_op_decrypt_verify_start): Rewrite using
_gpgme_op_decrypt_verify_start.
(gpgme_op_decrypt_verify): Likewise.
* decrypt.c: Include <string.h>, "gpgme.h" and "util.h".
(struct decrypt_result): Change to typedef op_data_t, rewritten.
(is_token): Remove function.
(release_op_data): New function.
(skip_token): Remove function.
(gpgme_op_decrypt_result): New function.
(_gpgme_decrypt_status_handler): Change first argument to void *.
Rework error handling.
(_gpgme_decrypt_start): Rename to ...
(decrypt_start): ... this. Call _gpgme_op_decrypt_init_result.
(_gpgme_op_decrypt_init_result): New function.
(gpgme_op_decrypt_start): Use decrypt_start.
(gpgme_op_decrypt): Likewise.
tests/
2003-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-decrypt.c: Rewritten.
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 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-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-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-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-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-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.
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-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-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-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.
* 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.
(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.
(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.
* 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-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-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 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.
* 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-03-06 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Encrypting a Plaintext): Document symmetric
encryption.
gpgme/
2002-03-06 Marcus Brinkmann <marcus@g10code.de>
* encrypt.c (_gpgme_encrypt_sym_status_handler): New function.
(gpgme_op_encrypt_start): New variable SYMMETRIC, set it if RECP
is null, and if it is set, use _gpgme_encrypt_sym_status_handler
as status handler and run _gpgme_passphrase_start.
* rungpg.c (_gpgme_gpg_op_encrypt): If RECP is zero, do symmetric
encryption.
* engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): If RECP is zero,
return error value.
* rungpg.c (_gpgme_gpg_op_verify): Add "--" argument.
tests/
2002-03-06 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-encrypt-sym.c: New file.
* gpg/Makefile.am (TESTS): Add t-encrypt-sym.
2002-03-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Information About Keys): Document GPGME_ATTR_EXPIRE.
gpgme/
2002-03-03 Marcus Brinkmann <marcus@g10code.de>
* passphrase.c (_gpgme_passphrase_status_handler): Also set the
error No_Passphrase if only a bad passphrase was provided.
2002-03-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Document verification of normal and
cleartext signatures.
gpgme/
2002-03-03 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (_gpgme_gpg_op_verify): If TEXT is of mode
GPGME_DATA_MODE_IN, construct a command line that stores the
plaintext in TEXT.
* verify.c (gpgme_op_verify_start): Accept TEXT being
uninitialized, and in this case interpret SIG as a normal or
cleartext signature and TEXT as a return data object.
* engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise.
tests/
2002-03-03 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-verify.c (main): Add a few more sanity checks, and a check
for normal signatures.
2002-02-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Encrypting a Plaintext): Document
GPGME_Invalid_Recipients.
(Error Values): Likewise.
gpgme/
2002-02-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h: Add new error code GPGME_Invalid_Recipient.
* encrypt.c (struct encrypt_result_s): New member invalid_recipients,
rename no_recipients to no_valid_recipients.
(_gpgme_encrypt_status_handler): Include error for invalid
recipients.
* engine-gpgsm.c (gpgsm_set_recipients): Change type of first
argument to GpgsmObject. Use that to report back the status about
the recipients.
2002-02-26 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Encrypting a Plaintext): Document
gpgme_op_encrypt_sign and gpgme_op_encrypt_sign_start.
gpgme/
2002-02-25 Marcus Brinkmann <marcus@g10code.de>
* engine.c (_gpgme_engine_op_encrypt_sign): New function.
* engine.h (_gpgme_engine_op_encrypt_sign): New prototype.
* rungpg.c (_gpgme_append_gpg_args_from_signers): New function.
(_gpgme_gpg_op_sign): Use that new function.
(_gpgme_gpg_op_encrypt_sign): New function.
* rungpg.h (_gpgme_gpg_op_encrypt_sign): New prototype.
* gpgme.h (gpgme_op_encrypt_sign_start): New prototype.
(gpgme_op_encrypt_sign): Likewise.
* Makefile.am (libgpgme_la_SOURCES): Add encrypt-sign.c.
* ops.h (_gpgme_encrypt_status_handler): Add prototype.
(_gpgme_sign_status_handler): Add prototype.
* sign.c (sign_status_handler): Rename to ...
(_gpgme_sign_status_handler): ... this and make non-static.
* encrypt.c (encrypt_status_handler): Rename to ...
(_gpgme_encrypt_status_handler): ... this and make non-static.
* encrypt.c (gpgme_op_encrypt_start): Use new status handler name.
* sign.c (gpgme_op_sign_start): Likewise.
tests/
2002-02-26 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-encrypt-sign.c: New file.
* gpg/Makefile.am (TESTS): Add t-encrypt-sign.
2002-02-25 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Creating a Signature): Add a note about
certifications to include.
(Included Certifications): New section.
gpgme/
2002-02-25 Marcus Brinkmann <marcus@g10code.de>
* context.h (struct gpgme_context_s): New member include_certs.
* gpgme.h (gpgme_set_include_certs): Add prototype.
(gpgme_get_include_certs): Likewise.
* gpgme.c (gpgme_set_include_certs): New function.
(gpgme_get_include_certs): Likewise.
(gpgme_new): Set include_certs to 1 (the default).
* engine.c (_gpgme_engine_op_sign): Accept new argument include_certs,
and pass it to _gpgme_gpgsm_op_sign.
* engine.h (_gpgme_engine_op_sign): Likewise for prototype.
* engine-gpgsm.c (_gpgme_gpgsm_op_sign): Accept new argument
include_certs and handle it.
* engine-gpgsm.h (_gpgme_gpgsm_start): Add new argument include_certs.
* sign.c (gpgme_op_sign_start): Add new argument to
_gpgme_engine_op_sign call.
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 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-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-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-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Passphrase callback): Change GpgmePassphraseCb's
R_HD type from void* to void**.
gpgme/
2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.h (GpgmePassphraseCb): Change type of R_HD from void* to
void**.
tests/
2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-signers.c (passphrase_cb): Change type of r_hd to void**.
* gpg/t-sign.c (passphrase_cb): Likewise.
* gpg/t-decrypt-verify.c (passphrase_cb): Likewise.
* gpg/t-decrypt.c (passphrase_cb): Likewise.
2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Creating data buffers): Change
gpgme_data_new_from_filepart's LENGTH type from off_t to size_t.
gpgme/
2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* data.c (gpgme_data_new_from_filepart): Change type of LENGTH
from off_t to size_t.
* gpgme.h: Likewise.