doc/
authorMarcus Brinkmann <mb@g10code.com>
Tue, 27 May 2003 01:31:06 +0000 (01:31 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Tue, 27 May 2003 01:31:06 +0000 (01:31 +0000)
commit9eef09369bf2b6b3a4503921a85a6e445f7da55a
tree55a4ce9e38ff6db7a8863c8d782956f4f2247ed4
parent61d5ad5ba4724fdc7c3fe996fae16476e28978da
doc/
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.
19 files changed:
trunk/NEWS
trunk/TODO
trunk/doc/ChangeLog
trunk/doc/gpgme.texi
trunk/gpgme/ChangeLog
trunk/gpgme/edit.c
trunk/gpgme/engine.h
trunk/gpgme/gpgme.h
trunk/gpgme/ops.h
trunk/gpgme/passphrase.c
trunk/gpgme/rungpg.c
trunk/tests/ChangeLog
trunk/tests/gpg/t-decrypt-verify.c
trunk/tests/gpg/t-decrypt.c
trunk/tests/gpg/t-edit.c
trunk/tests/gpg/t-encrypt-sign.c
trunk/tests/gpg/t-encrypt-sym.c
trunk/tests/gpg/t-sign.c
trunk/tests/gpg/t-signers.c