Commit Graph

419 Commits

Author SHA1 Message Date
Daiki Ueno
0aaf1dedd6
doc: Fix minor errors in I/O callback example
* gpgme.texi (I/O Callback Example): Fix typos, add timeout to select,
and initialize mutex as recursive.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
2016-09-22 09:12:43 +02:00
Werner Koch
db23985127
doc: Mention language bindings in the manual.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-09-19 09:06:32 +02:00
Werner Koch
3d6340e8c5
core: Map GPGME_STATUS_EOF to the empty string.
* src/status-table.c (_gpgme_status_to_string): Return "" for EOF.
* src/engine-gpg.c (read_status): Ditto.  The old code accidently used
GPGME_STATUS_EOF which is the integer 0 and neiteyr NULL nor a string.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-09-16 16:00:27 +02:00
Werner Koch
00f95e0fad
doc: Move description of most deprecated functions to a new appendix.
--
Signed-off-by: Werner Koch <wk@gnupg.org>
2016-09-16 12:20:55 +02:00
Werner Koch
e6405df624
doc: Document the recently added --quick-foo related functions.
--
2016-09-16 11:48:29 +02:00
Werner Koch
ed1f2700a7
core: New function gpgme_op_interact, deprecate gpgme_op_edit.
* src/gpgme.h.in (gpgme_interact_cb_t): New.
(GPGME_INTERACT_CARD): New.
(gpgme_op_interact_start, gpgme_op_interact): New.
* src/libgpgme.vers, src/gpgme.def: Add new functions.
* src/edit.c (op_data_t): Rename fnc to fnc_old and change users.  Add
fnc.
(edit_status_handler): Call old or new callback.
(command_handler): Ditto.
(interact_start): New.
(gpgme_op_interact_start, gpgme_op_interact_start): New.
* src/status-table.c (_gpgme_status_to_string): New.

* tests/gpg/t-edit.c (edit_fnc): Rename to interact_fnc and change
type of STATUS.  Use gpgme_io_writen.
(main): s/gpgme_op_edit/gpgme_op_interact/.
--

This change will eventually allow us to remove all those status codes
from gpgme.h.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-09-15 11:39:43 +02:00
Werner Koch
d2b72d3cc1
core: Minor change of the gpgme_op_edit semantics.
* src/edit.c (command_handler): Handle special error code.
* src/engine-gpg.c (read_status): Ditto.
* src/engine-gpgsm.c (status_handler): Ditto.
* src/engine-uiserver.c (status_handler): Ditto.
* src/util.h (GPG_ERR_FALSE): Define for older libgpg-error versions.
--

An edit callback may now simply return GPG_ERR_FALSE to indicate that
it did not handled the status code.  GPGME will the do the appropriate
action, which is to send an empty line.

Note that it is highly unlikely that GPG_ERR_FALSE has ever been used
by an application as return value from an edit interactor.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-09-15 09:24:29 +02:00
Werner Koch
cc353701b0
core: New function gpgme_op_createsubkey.
* src/genkey.c (createsubkey_start): New.
(gpgme_op_createsubkey_start, gpgme_op_createsubkey): New.
* src/gpgme.def, src/libgpgme.vers: Add them.
* src/engine-gpg.c (gpg_createkey): Factor some code out to ...
(gpg_add_algo_usage_expire): new.
(gpg_addkey): Implement.
* tests/run-genkey.c: Add option --addkey.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-09-14 09:51:16 +02:00
Werner Koch
9ee103957e
core: Add GPGME_KEYLIST_MODE_WITH_TOFU.
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_TOFU): New.
* src/engine-gpg.c (gpg_keylist_build_options): Use that.
* src/keylist.c: Include limits.h.
(parse_tfs_record): New.
(keylist_colon_handler): Support TFS record.
* tests/run-keylist.c: Include time.h.
(isotimestr): New.
(main): Add option --tofu.  Print TOFU info.
* tests/run-verify.c: Include time.h.
(isotimestr): New.
(print_result): Use isotimestr for TOFU dates.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-25 11:38:03 +02:00
Werner Koch
be4ff75d7d
core: Change the way TOFU information are represented.
* src/gpgme.h.in (struct _gpgme_signature): Remove field 'tofu'.  Add
field 'key'.
(struct _gpgme_key): Add field 'fpr'.
(struct _gpgme_user_id): Add field 'tofu'.
(struct _gpgme_tofu_info): Remove fields 'address' and 'fpr'.
* src/key.c (gpgme_key_unref): Release TOFU and FPR.
* src/keylist.c (keylist_colon_handler): Store the fingerprint of the
first subkey also in KEY.
* src/verify.c (release_tofu_info): Remove.
(release_op_data): Release KEY.
(parse_tofu_user): Rewrite for new data structure.
(parse_tofu_stats): Ditto.
(parse_tofu_stats_long): Ditto.
* tests/run-verify.c (print_result): Ditto.
* tests/run-keylist.c (main): Print more fields.
--

TOFU information are now associated with the user ID and not with a
separate object.

Note that this breaks code relying on the former non-released TOFU
feature.  The C++ bindings won't work right now.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-23 15:24:10 +02:00
Werner Koch
24e61984c9
core: Add new items for gpgme_get_dirinfo.
* src/dirinfo.c (WANT_SYSCONFDIR, WANT_LIBEXECDIR, WANT_LIBDIR): New.
(WANT_DATADIR, WANT_LCOALEDIR, WANT_AGENT_SSH_SOCKET): New
(WANT_DIRMNGR_SOCKET): New.
(dirinfo): Add fields 'sysconfdir', 'bindir', 'libexecdir', 'libdir',
'datadir', 'localedir', 'agent_ssh_socket', and 'dirmngr_socket'.
(parse_output): Set these fields.
(get_gpgconf_item): Return them.
(gpgme_get_dirinfo): Likewise.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-22 16:57:51 +02:00
Werner Koch
3e60788810
core: New commands --lang and --have-lang for gpgme-config
* configure.ac (GPGME_CONFIG_AVAIL_LANG): New ac_subst.
* src/gpgme-config.in (avail_lang): Add commands --lang and
--have-lang.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-21 15:49:03 +02:00
Werner Koch
8c09dd9989
core: New global flag "require-gnupg".
* src/gpgme.c (gpgme_set_global_flag): Add flag.
* src/engine.c (engine_minimal_version): New variable.
(_gpgme_set_engine_minimal_version): New function.
(gpgme_get_engine_info): Check that flag.

* tests/run-keylist.c (main): New option --require-gnupg.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-16 18:53:42 +02:00
Werner Koch
fe1e8e71aa
core: Make use of the "size-hint" in engine-gpg.
* src/engine-gpg.c: Include data.h.
(add_input_size_hint): New.
(gpg_decrypt, gpg_encrypt, gpg_encrypt_sign, gpg_sign)
(gpg_verify): Call new function,

* tests/run-encrypt.c (status_cb): Print to stderr.
(progress_cb): New.o
(main): Add option --progress.  Print full-status lines.  Provide a
size for the input data.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-08-12 15:32:31 +02:00
Werner Koch
b7d99e0218
doc: Get rid of version.texi
* configure.ac (CC_FOR_BUILD): New.
* doc/mkdefsinc.c: New.  Taken from GnuPG and modified for gpgme.
* doc/Makefile.am (EXTRA_DIST): Add defsincdate and mkdefsinc.c
(BUILT_SOURCES): new.
(gpgme.texi): New dependency.
(mkdefsinc, defsincdate, defs.inc): New rules.
(dist-hook): New.
* doc/gpgme.texi: Include defs.inc.  Remove version.texi.
--

GnuPG-bug-id: 2352

That new system should also yield more approriate date infos for the
manual.
2016-08-10 16:33:20 +02:00
Andre Heinecke
3d2f027d0f core: Add support for mixed symmetric and asym enc
* src/gpgme.h.in (gpgme_encrypt_flags_t): New flag
GPGME_ENCRYPT_SYMMETRIC.
* src/engine-gpg.c (gpg_encrypt): Also add --symmetric if the flag
is given.
* NEWS: Mention new flag.
* tests/run-encrypt.c (show_usage): Extend for --symmetric.
(main): Handle --symmetric.
(main): Set passphrase_cb in loopback mode.
(main): Fix encrypt call if no recipients are given.
* tests/gpg/t-encrypt-mixed.c: New.
* tests/gpg/Makefile.am (c_tests): Add new test.
* doc/gpgme.texi: Document new flag.
2016-08-09 14:23:51 +02:00
Justus Winter
135185b7ef doc: Document the Assuan protocol.
* doc/gpgme.texi: Document the Assuan protocol.

GnuPG-bug-id: 2407
Signed-off-by: Justus Winter <justus@g10code.com>
2016-08-02 16:51:08 +02:00
Justus Winter
e11c65cfb5 doc: Fix formatting.
--
Signed-off-by: Justus Winter <justus@g10code.com>
2016-08-02 16:50:54 +02:00
Werner Koch
d8d5f5a167
core: New GPGME_DATA_ENCODING_MIME.
* src/gpgme.h.in (GPGME_DATA_ENCODING_MIME): New.
* src/data.c (gpgme_data_set_encoding): Adjust check.
* src/engine-gpg.c (have_gpg_version): New.
(gpg_encrypt, gpg_encrypt_sign): Pass flag '--mimemode'.
(gpg_sign): Ditto.

* lang/cpp/src/data.h (GpgME): Add MimeEncoding.
* lang/cpp/src/data.cpp (encoding, setEncoding): Support MimeEncoding.

* src/gpgme-tool.c (server_data_encoding): Add flag --mime.
--

This feature allows an application to declare that the encrypted or
signed data is a valid MIME part.

What is missing is a way to return that information to the application
after decryption/verification.  This can be done by setting the
encoding of the output data object; however this requires some
internal additions to our processing model.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-07-13 14:45:02 +02:00
Andre Heinecke
329ab93f7e Doc: Document pinentry mode
* doc/gpgme.texi (Passphrase Callback): Document as context
attribute.
(gpgme_set_passphrase_cb): Note that this requires LOOPBACK mode
with GnuPG 2.1.
2016-07-04 11:46:32 +02:00
Werner Koch
dac2c5441d
api: Add new context flag "raw-description".
* src/context.h (struct gpgme_context): Add field raw_description.
* src/gpgme.c (gpgme_set_ctx_flag): New flag.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-05-21 10:31:20 +02:00
Werner Koch
88f2c1c0d1
api: Add new function gpgme_set_ctx_flag.
* src/gpgme.h.in (gpgme_set_ctx_flag): New prototype.
* src/gpgme.c (gpgme_set_ctx_flag): New.
* src/gpgme.def, src/libgpgme.vers: Add new function.
* src/context.h (struct gpgme_context): Add FULL_STATUS.
* src/decrypt.c (_gpgme_decrypt_status_handler): Do not call the
  status callback if FULL_STATUS is set.
* src/genkey.c (genkey_status_handler): Ditto.
* src/passphrase.c (_gpgme_passphrase_status_handler): Ditto.
* src/sign.c (_gpgme_sign_status_handler): Ditto.

* src/engine-backend.h (struct engine_ops): Add SET_STATUS_CB and add
adjust all definitions of that variable.
* src/engine.c (_gpgme_engine_set_status_cb): New.
* src/op-support.c (_gpgme_op_reset): Call this function.

* src/engine-gpg.c (struct engine_gpg): Add fields MON_CB and
MON_CB_VALUE.
(gpg_set_status_cb): New.
(_gpgme_engine_ops_gpg): Register that function.
(read_status): Call the monitor callback.

* src/engine-gpgsm.c (struct engine_gpgsm): Add fields MON_CB and
MON_CB_VALUE.
(_gpgme_engine_ops_gpgsm): Register that function.
(gpgsm_assuan_simple_command): Change first arg to be an engine
context and adjust call callers.  Call the monitor callback.

* src/engine-uiserver.c (struct engine_uiserver): Add fields MON_CB
and MON_CB_VALUE.
(_gpgme_engine_ops_uiserver): Register that function.
(uiserver_assuan_simple_command): Change first arg to be an engine
context and adjust call callers.  Call the monitor callback.

* tests/run-verify.c (status_cb): New.
(print_result): Print algo names.
(main): Add option --status.
--

This new feature is mainly intended for bug tracking.  Having access
to the raw status lines might also be useful for applications, though.

Signed-off-by: Werner Koch <wk@gnupg.org>
2016-05-19 17:04:54 +02:00
Daiki Ueno
3b6e9a3d0a
doc: Fix minor errors
* doc/gpgme.texi: Fix errors and typos in the cancellation and
gpgme_import_result_t documentation.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
2015-12-04 16:25:01 +01:00
Werner Koch
bb600aa8fd
w32: Add new global flag "w32-inst-dir".
* src/gpgme.c (gpgme_set_global_flag): Add flag "w32-inst-dir";
* src/posix-util.c (_gpgme_set_override_inst_dir): New stub.
* src/w32-util.c (override_inst_dir): New var.
(_gpgme_get_inst_dir): Return this var is set.
(_gpgme_set_override_inst_dir): New.
--

See
https://lists.gnupg.org/pipermail/gnupg-devel/2015-September/030267.html
for background.

Signed-off-by: Werner Koch <wk@gnupg.org>
2015-10-28 16:28:48 +01:00
Werner Koch
c4b6b35bfa
Add gpgme_pubkey_algo_string
* src/gpgme.h.in (GPGME_PK_EDDSA): New.
(gpgme_pubkey_algo_string): New.
* src/conversion.c (_gpgme_map_pk_algo): Add new algo.
* src/gpgme.c (gpgme_pubkey_algo_string): New.
(gpgme_pubkey_algo_name): Reformat.

Signed-off-by: Werner Koch <wk@gnupg.org>
2015-08-30 19:04:44 +02:00
Werner Koch
107bff70ed
Release 1.6.0
* configure.ac: Set LT version to C25/A14/R0.

Signed-off-by: Werner Koch <wk@gnupg.org>
2015-08-26 10:06:00 +02:00
Werner Koch
2b632bbb78
Add an export secret key feature.
* src/gpgme.h.in (GPGME_EXPORT_MODE_SECRET): New.
(GPGME_EXPORT_MODE_RAW): New.
(GPGME_EXPORT_MODE_PKCS12): New.
* src/export.c (export_start, export_ext_start): Allow new flags.
* src/engine-gpg.c (export_common): Support secret key export.
* src/engine-gpgsm.c (gpgsm_export, gpgsm_export_ext): Ditto.

* src/gpgme-tool.c (cmd_export): Add options --secret, --raw,
and --pkcs12.
* tests/run-export.c (main): Likewise.
--

Note that exporting secret X.509 keys requires GnuPG 2.1.8.

Signed-off-by: Werner Koch <wk@gnupg.org>
2015-08-24 12:41:24 +02:00
Ben Kibbey
70b3e5964e Fix gpgme_{get,set}_status_cb to match documentation.
* doc/gpgme.texi: Minor fixes.
* src/gpgme.c (gpgme_get_status_cb): Set return variables to NULL and
check for a valid ctx pointer.
2015-08-15 18:19:27 -04:00
Ben Kibbey
4fadcf06ec Add gpgme_set/get_status_cb().
* src/gpgme.h.in (gpgme_set_status_cb): New.
(gpgme_get_status_cb): New.
(gpgme_status_cb_t): New.
* src/gpgme.c (gpgme_set_status_cb): New.
(gpgme_get_status_cb): New.
* src/context.h (status_cb): New.
(status_cb_value): New.
* src/gpgme.def: Export new symbols.
* src/libgpgme.vers: Ditto.
* doc/gpgme.texi: Document these new functions.

--
This callback function is used to forward status messages from gpg back
to the client.
2015-08-15 18:19:27 -04:00
Andre Heinecke
08086dd690
Add offline mode support for CMS keylisting
* doc/gpgme.texi: Document offline mode.
* src/context.h (gpgme_context): Add offline.
* src/engine-backend.h (keylist, keylist_ext): Add engine_flags.
* src/engine.c, src/engine.h (_gpgme_engine_op_keylist): Ditto.
  (_gpgme_engine_op_keylist_ext): Ditto.
* src/engine.h (GPGME_ENGINE_FLAG_OFFLINE): New.
* src/engine-gpg.c (gpg_keylist, gpg_keylist_ext): Ditto.
* src/engine-gpgsm.c (gpgsm_keylist): Handle engine_flags.
  (gpgsm_keylist_ext): Ditto.
* src/gpgme.c (gpgme_set_offline, gpgme_get_offline): New.
* src/gpgme.def (gpgme_set_offline, gpgme_get_offline): New.
* src/gpgme.h.in (gpgme_set_offline, gpgme_get_offline): New.
* src/libgpgme.vers (gpgme_set_offline, gpgme_get_offline): New.
* src/keylist.c (gpgme_op_keylist_start): Set offline flag.
  (gpgme_op_keylist_ext_start): Ditto.
* tests/run-keylist.c (show_usage, main): Add offline argument.

--
The offline engine option was introduced with gpgsm 2.1.6
it is mainly useful for a full keylisting that includes
the certificate validation but does not depend on external
information that could take an indefinite amount of time to
collect.

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
2015-07-31 15:18:27 +02:00
Daniel Kahn Gillmor
c32fab44f8 doc: Update gpl.texi to match version from gnupg
--

Somehow the doc/gpl.texi from gpgme and gnupg drifted out of sync.
This patch to gpgme's file brings it in line with gnupg's master
branch, and avoids the following errors during make:

./gpl.texi:667: @section seen before @end enumerate
./gpl.texi:724: unmatched `@end enumerate'
./gpl.texi:1: warning: node next `Copying' in menu `Concept Index'
   and in sectioning `Function and Data Index' differ
2014-12-15 11:55:05 +01:00
Werner Koch
162c87f069 Post release updates
--
2014-11-21 21:29:11 +01:00
Werner Koch
a9ae0d1428 doc: Clarify the FILE command.
--
2014-11-19 11:53:12 +01:00
Werner Koch
8031341283 Improve the debug output a bit.
* src/debug.h (TRACE_ERR): Include the line number in the output.
2014-11-06 15:59:06 +01:00
Werner Koch
4027a0a897 build: Implement SYSROOT feature.
* configure.ac: Document SYSROOT.
* m4/gpg-error.m4: Update from libgpg-error master.
* src/gpgme.m4: Implement SYSROOT stuff.
2014-10-02 15:57:50 +02:00
Werner Koch
4dc9af2415 Add new keylist mode GPGME_KEYLIST_MODE_WITH_SECRET.
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_SECRET): New.
* src/engine-gpg.c (gpg_keylist_build_options): Handle new mode.
* src/engine-gpgsm.c (gpgsm_keylist, gpgsm_keylist_ext): Ditto.
* src/keylist.c (parse_sec_field15): Add arg key and take care of
--with-secret output.

* src/gpgme-tool.c (gt_get_keylist_mode, cmd_keylist_mode): Add
"with_secret".  Print card info and and secret flag for subkeys.
--

Note: This mode may only be used with GnuPG >= 2.1.
2014-06-04 09:57:54 +02:00
Werner Koch
88f15336ec Add field CURVE to the key info.
* src/gpgme.h.in (struct _gpgme_subkey): Add field CURVE.
* src/key.c (gpgme_key_unref): Free CURVE.
* src/keylist.c (keylist_colon_handler): Set CURVE.

* src/gpgme.c (gpgme_release): For failsafe reasons reset engine and
engine info after freeing.
--

The engine hack is useful in case the other release functions
accidently call engine release.
2014-05-08 20:39:15 +02:00
Werner Koch
d5fb92cdae Map public key algos returned by gpg to gpgme values.
* src/conversion.c (_gpgme_map_pk_algo): New.
* src/decrypt.c (parse_enc_to): Add arg PROTOCOL and map pubkey algo.
(_gpgme_decrypt_status_handler): Map pubkey algo.
* src/keylist.c (keylist_colon_handler): Map pubkey algo.
* src/sign.c (parse_sig_created): Add arg PROTOCOL and map pubkey
algo.
* src/verify.c (parse_new_sig): Ditto.
(parse_valid_sig): Ditto.

* src/gpgme.h.in (GPGME_PK_ECC): New.
(GPGME_MD_SHA224): New.
* src/gpgme.c (gpgme_pubkey_algo_name): Add GPGME_PK_ECC case.
(gpgme_hash_algo_name): Add GPGME_MD_SHA224.
--

This affects only the not yet released ECC code of GnuPG 2.1.
2014-05-08 14:11:58 +02:00
Werner Koch
991cde9e79 Add GPGME_ENCRYPT_NO_COMPRESS flag.
* src/gpgme.h.in (GPGME_ENCRYPT_NO_COMPRESS): New.
* src/engine-gpg.c (gpg_encrypt, gpg_encrypt_sign): Implement it.
* src/gpgme-tool.c (_cmd_sign_encrypt): Add option --no-compress.
2014-05-08 11:31:30 +02:00
Werner Koch
d3bd8fff86 Actually implement flags for gpgme_op_spawn.
* src/spawn.c (gpgme_op_spawn_start, gpgme_op_spawn): Pass FLAGS dow
to spawn_start and add FLAGS args along the call path.
* src/engine-spawn.c (engspawn_start): Hack to automagically provide
argv[0].
2014-04-10 14:17:19 +02:00
Werner Koch
4f2d652e60 Add GPGME_PROTOCOL_SPAWN and gpgme_op_spawn.
* src/gpgme.h.in (GPGME_PROTOCOL_SPAWN): New.
(GPGME_SPAWN_DETACHED, GPGME_SPAWN_ALLOW_SET_FG): New.
* src/gpgme.c (gpgme_set_protocol): Add new protocol.
(gpgme_get_protocol_name): Ditto.
* src/spawn.c: New.
* src/libgpgme.vers, src/gpgme.def: Add new public functions.
* src/engine-spawn.c: New.
* src/Makefile.am: Add new files.
* src/engine-backend.h (struct engine_ops): Add OPSPAWN.
* src/engine.c (engine_ops): Add _gpgme_engine_ops_spawn.
(gpgme_get_engine_info): Add Spawn to the list of protocols.
(_gpgme_engine_op_spawn): New.

* src/gpgme-tool.c (gt_protocol_from_name): Add new protocol.
(gt_spawn, cmd_spawn): New.
2014-04-10 13:01:00 +02:00
Werner Koch
77931a9a14 Add gpgme_get_dirinfo.
* src/dirinfo.c (gpgme_get_dirinfo): New.
* tests/t-engine-info.c (main): Print results from that function.
2014-04-10 11:48:20 +02:00
Daiki Ueno
40938feb3f doc: Fix documentation of struct data types
* gpgme.texi (Key Management): Document is_cardkey and card_number
members of gpgme_subkey_t.
(Decrypt): Remove description of the non-existent wrong_key_usage
member of gpgme_recipient_t.
(Verify): Document pka_address member of gpgme_signature_t.
(Creating a Signature): Add missing member names in
gpgme_new_signature_t.
(Registering I/O Callbacks): Fix reference of gpgme_io_cbs struct.
2014-03-05 08:16:20 +01:00
Werner Koch
6564e5e78e Add global flags disable-gpgconf, gpgconf-name, and gpg-name.
* src/gpgme.c (gpgme_set_global_flag): Add names "disable-gpgconf",
"gpgconf-name", and "gpg-name".
* src/dirinfo.c (_gpgme_dirinfo_disable_gpgconf): New.
(get_gpgconf_item): Minor debug info change.
* src/posix-util.c (default_gpg_name, default_gpgconf_name): Add vars.
(_gpgme_set_default_gpg_name): New.
(_gpgme_set_default_gpgconf_name): New.
(_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Use new vars.
(walk_path): Add debug output on failure.
* src/w32-util.c (default_gpg_name, default_gpgconf_name): Add vars.
(replace_slashes): New.
(get_basename): New.
(_gpgme_set_default_gpg_name): New.
(_gpgme_set_default_gpgconf_name): New.
(_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Use new vars.

* tests/t-engine-info.c (main): Add --verbose and --set-global-flag
options.
--

Note that the Windows part has not been tested.
2014-01-06 17:16:52 +01:00
Werner Koch
b0aaa3f9ae Document API change for GPGME_EVENT_DONE from 2009.
* doc/gpgme.texi (I/O Callback Interface): Fix description for the
event arg.
--

With commit c8e934b2 (2009-10-26) gpgme_io_event_done_data_t was
introduced to replace the use of gpg_error_t with GPGME_EVENT_DONE.
Unfortunately this was not documented.  Maybe at that time the event
code was considered internal and its use in GPA was not known.  Too
bad.
2013-08-19 20:43:19 +02:00
Werner Koch
8579091c4f Add function gpgme_data_identify.
* src/gpgme.h.in (gpgme_data_type_t): New.
(gpgme_data_identify): New prototype.
* src/data-identify.c: New.
* src/parsetlv.c, src/parsetlv.h: New.  Take from gpa.
* src/libgpgme.vers, src/gpgme.def: Add gpgme_data_identify.
* src/gpgme-tool.c (status): Add STATUS_IDENTIFY_RESULT.
(gt_identify): New.
(cmd_identify): New.

(hlp_passwd): Move close to cmd_passwd.
--

It is often useful to have a way to identify the data which needs
processing.  This is such a common task that it makes sense to
implement this in gpgme to avoid diverging implementations.
2013-08-09 19:19:26 +02:00
Werner Koch
393a9471f2 doc: Add --binary option for the OUTPUT command of an uiserver. 2013-07-31 17:32:02 +02:00
Werner Koch
ff84d8d894 doc: Fix variable name.
--
GnuPG-bug-id: 1507
2013-06-18 10:46:24 +02:00
Werner Koch
f2eeccbdfa Add function gpgme_signers_count.
* src/signers.c (gpgme_signers_count): New.
* src/libgpgme.vers, src/gpgme.def: Add as external symbol.
* src/gpgme.h.in: Add prototype.
2013-06-18 10:27:46 +02:00
Hans-Christoph Steiner
d34e343487 doc: rename gpgme_sub_key_t to gpgme_subkey_t to match gpgme.h
--
2013-05-28 10:37:51 +02:00
Werner Koch
6d0d8e7ba0 Make definition of off_t robust against misbehaving w32 toolchains.
* 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.
2013-05-16 17:48:50 +02:00
Werner Koch
0ff0aa3fc8 Syntax fix for gpgme.texi.
--

This fixes commit 12374cbece.
2013-04-30 18:05:04 +02:00
Werner Koch
12374cbece Explain the GPGME_DEBUG variable.
--
2013-04-16 18:30:20 +02:00
Werner Koch
ef5cd38123 Release 1.4.0.
* configure.ac: Bump LT version to C20/A9/R0.
2013-02-26 18:02:10 +01:00
Werner Koch
29eced5068 Add public function gpgme_io_writen.
* 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.
2013-02-07 20:51:29 +01:00
Werner Koch
d230b7c2f9 Add DCO file
--
2012-09-25 19:21:00 +02:00
Werner Koch
db33945ab3 Document contribution rules.
* doc/HACKING (License policy): New.
* doc/DCO: New.
* AUTHORS: Change maintainer address.
2012-09-25 19:19:13 +02:00
Werner Koch
c62b79a1d6 Add gpgme_set_global_flag to help debugging
* 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.
2012-09-25 15:38:26 +02:00
Werner Koch
475640a527 Fix minor documentation problem.
--
Fixes bug#1404.
(There is mentioned data field “recipient”, but actual data field
name is “recipients”.)
2012-05-02 10:35:47 +02:00
W. Trevor King
4cb408d33e .gitignore: flesh out rules and add subdirectory-.gitignores. 2012-04-20 16:05:11 +02:00
W. Trevor King
bb62104adf uiserver.texi: fix decryption -> encryption typo in PREP_ENCRYPT discussion.
* doc/uiserver.texi (PREP_ENCRYPT): Fix documentation.
2012-04-03 15:15:05 +02:00
Werner Koch
a4c4ee1aae Generate the ChangeLog from commit logs.
* 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.
2011-12-02 11:36:37 +01:00
Marcus Brinkmann
5f3de0bfff Fix I/O callback example. 2011-05-12 14:45:46 +02:00
Marcus Brinkmann
f61abeb0cf Correct key-gen example. 2011-05-12 14:42:18 +02:00
Werner Koch
3a7058cade Typo fixes spotted by Daiki Ueno. 2011-01-07 14:00:54 +01:00
Werner Koch
2281024d4c Add option GPGME_EXPORT_MODE_MINIMAL 2010-02-16 20:07:03 +00:00
Werner Koch
dbcce0df8f Allow the native W32 version to properly work with sockets. 2010-01-25 16:04:27 +00:00
Werner Koch
1b2fb1b737 Support gpgme_op_apsswd for GPG. 2010-01-08 19:15:06 +00:00
Werner Koch
97c5d4d312 Add an API to change passphrases. Currently only implemented for
GPGSM.  Requires GnuPG 2.1
2010-01-05 17:36:53 +00:00
Werner Koch
fc0fd88d7f Prepare for a new protocol.
Comment clarification.
2009-11-03 20:27:35 +00:00
Werner Koch
0fcf3ee915 Fix detection of invalid signer keys.
Support the new INV_SGNR status code.
2009-08-06 17:17:18 +00:00
Werner Koch
bebd9cbe29 Add support for gpg --fetch-keys. 2009-06-16 15:42:37 +00:00
Marcus Brinkmann
3320cc1742 doc/
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-06-16 14:43:38 +00:00
Werner Koch
b872605941 Add new functions to import and export keys specified by gpgme_key_t.
Allow  exporting keys to a keyserver.
2009-06-16 11:42:21 +00:00
Marcus Brinkmann
bdb7bcf938 doc/
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-28 15:16:01 +00:00
Marcus Brinkmann
2c5d801fc4 doc/
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.
2009-05-18 17:38:31 +00:00
Marcus Brinkmann
6e27621062 2009-05-05 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Engine Information): Replace path by file_name.
2009-05-05 17:19:17 +00:00
Werner Koch
aceb60d4dd Add GPGME_KEYLIST_MODE_EPHEMERAL. 2009-03-18 11:19:29 +00:00
Werner Koch
5beba8689c Fix doc bug. 2008-11-28 10:32:12 +00:00
Werner Koch
eae8d3830c Fix bug #818.
Use gpgme.h.in instead of in-place editing gpgme.h.
2008-10-20 15:59:19 +00:00
Werner Koch
9c6bf32eea Add a module overview diagram. 2008-07-17 17:09:39 +00:00
Werner Koch
a60cbde709 Update automake scripts.
Minor doc changes.
2008-07-04 15:46:01 +00:00
Marcus Brinkmann
695ec56ffb 2008-06-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Cancellation): Document gpgme_cancel_async.

gpgme/
2008-06-27  Marcus Brinkmann  <marcus@g10code.de>

	* context.h: Include "sema.h".
	(struct gpgme_context): New members lock and canceled.
	* gpgme.c (gpgme_new): Initialize lock.
	(gpgme_release): Destroy lock.
	(gpgme_cancel_async): New function.
	* op-support.c (_gpgme_op_reset): Reset the canceled flag.
	* wait-global.c (gpgme_wait): Check cancel flag before processing
	any I/O callbacks.
	* wait-private.c (_gpgme_wait_on_condition): Likewise.
	* wait-user.c (_gpgme_user_io_cb_handler): Likewise.
2008-06-27 16:07:33 +00:00
Werner Koch
d0fe86179c Updated example. 2008-06-25 01:44:50 +00:00
Werner Koch
b0a5687a16 Updated the example. 2008-06-20 10:40:52 +00:00
Werner Koch
63ea0d6663 Add example.
Update gpgconf test.
2008-06-19 18:38:28 +00:00
Werner Koch
9e4169fcec Add new types to the gpgconf interface.
Fix a parsing bug in gpgconf interface.
2008-06-19 17:37:31 +00:00
Werner Koch
1358096083 Add missing file. 2008-06-05 10:56:40 +00:00
Werner Koch
f54ea0e32c Include the GnuPG UI Server specification.
Change the license of the manual to GPLv3+.
2008-06-04 14:14:38 +00:00
Werner Koch
b72c001283 Support --locate-keys feature of gpg. 2008-05-07 15:41:14 +00:00
Marcus Brinkmann
3dcae464f4 doc/
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.
2008-03-11 16:05:40 +00:00
Marcus Brinkmann
639df34f65 2008-03-05 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Library Version Check): Rename snippet function to
	init_gpgme.
	(I/O Callback Example): Call it here.
2008-03-05 12:00:57 +00:00
Marcus Brinkmann
ef430d7828 2008-01-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi: Document that data encoding affects some output data
	objects now.
2008-01-28 19:41:26 +00:00
Marcus Brinkmann
30df62122d doc/
2007-09-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Protocols and Engines): Document GPGME_PROTOCOL_UNKNOWN.

gpgme/
2007-09-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (gpgme_protocol_t): Add GPGME_PROTOCOL_UNKNOWN.
	* gpgme.c (gpgme_get_protocol_name): Implement support for
	GPGME_PROTOCOL_UNKNOWN.
2007-09-27 12:17:24 +00:00
Werner Koch
da6f3dc0c5 Fixed bug in gpgme_data_relase_and_get_mem.
Typo fixes.
2007-09-14 12:27:54 +00:00
Werner Koch
bc82a66514 Add new signature_t member chain_model. 2007-08-07 15:21:50 +00:00
Werner Koch
906da085cf Changes for W32 2007-07-12 15:25:20 +00:00
Werner Koch
4daa6aa2c9 Added target "online". 2007-06-29 14:41:35 +00:00
Marcus Brinkmann
b240231ce3 2007-06-05 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Advanced Key Editing): New section.
2007-06-05 14:47:18 +00:00
Marcus Brinkmann
2c5d7a18a9 2007-05-18 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Error Strings): Fix documentation of
	gpgme_strerror_r.
2007-05-18 22:30:42 +00:00
Marcus Brinkmann
f2bd9ab3be 2007-05-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Registering I/O Callbacks): Fix description of EVENT
	member of gpgme_event_io_t.
2007-05-03 20:12:40 +00:00
Moritz Schulte
27e9625668 2006-11-01 Moritz Schulte <moritz@g10code.com>
* gpgme.texi (Data Buffer I/O Operations): Fixed entry for
	gpgme_data_seek: OFFSET is not a pointer; some s/whence/offset/.
2006-11-01 10:02:12 +00:00
Marcus Brinkmann
9247e9081b doc/
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.
2006-09-25 14:57:00 +00:00
Marcus Brinkmann
fba48de1ee doc/
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.
2006-07-16 13:36:04 +00:00
Marcus Brinkmann
0a8808623a 2006-06-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Passphrase Callback): Fix inverted condition in
	description.
2006-06-21 01:15:42 +00:00
Werner Koch
b1fb4f2fa6 Basic PKA support. 2005-12-20 20:22:19 +00:00
Werner Koch
a1e484f9ea * Fixed a bug in that the fingerprints of subkeys are not available.
* Clarified usage of the SECRET flag in key listings.  It is now
   reset for stub keys.
2005-12-06 16:30:21 +00:00
Werner Koch
6b24b361ad GPA does now work with the glib based i/o backend. 2005-11-18 16:52:38 +00:00
Werner Koch
3acdcbf67b build static and shared lib by default - required by gpgol. 2005-11-15 16:04:28 +00:00
Marcus Brinkmann
a336bc6834 doc/
2005-10-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Destroying Data Buffers): Document gpgme_free.

gpgme/
2005-10-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (gpgme_free): New prototype.
	* data-mem.c (gpgme_free): New function.
	* libgpgme.vers (GPGME_1.1): Add gpgme_free.
	* gpgme.def: Add gpgme_free.
2005-10-06 10:44:26 +00:00
Marcus Brinkmann
5f5faeafa1 doc/
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-02 14:39:31 +00:00
Marcus Brinkmann
df06547338 Fix copyright year. 2005-10-01 22:15:20 +00:00
Marcus Brinkmann
20f85c2b57 2005-10-01 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi: Enclose all return parameters of deftypefuns in
	curly brackets.
2005-10-01 22:14:40 +00:00
Marcus Brinkmann
b3304042aa doc/
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-10-01 02:33:35 +00:00
Marcus Brinkmann
c6ee58ef55 doc/
2005-09-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Data Buffer I/O Operations, Data Buffer Meta-Data):
	New subsections.

gpgme/
2005-09-30  Marcus Brinkmann  <marcus@g10code.de>

	* data.h (struct gpgme_data): New member file_name.
	* data.c (gpgme_data_set_filename): New function.
	(_gpgme_data_release): Free DH->filename if necessary.
	(gpgme_data_get_filename): New function.
	* rungpg.c (gpg_encrypt): Set filename option.
	(gpg_encrypt_sign): Likewise.
	(gpg_sign): Likewise.
	* libgpgme.vers (GPGME_1.1): Add gpgme_data_set_file_name and
	gpgme_data_get_file_name.

tests/
2005-09-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/Makefile.am (TESTS): Add t-filename.
	* gpg/t-filename.c: New file.
2005-09-30 14:17:47 +00:00
Marcus Brinkmann
74db831fc8 doc/
2005-09-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi: Replace plaintext_filename with file_name.

gpgme/
2005-09-30  Marcus Brinkmann  <marcus@g10code.de>

	* decrpyt.c, verify.c, gpgme.h: Replace plaintext_filename with
	file_name.
2005-09-30 13:24:40 +00:00
Marcus Brinkmann
c77dc1d42a 2005-09-30 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Document is_qualified.
2005-09-30 11:01:37 +00:00
Marcus Brinkmann
7bdaf53a4a doc/
2005-07-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Decrypt): Add plaintext_filename to
	gpgme_decrypt_result_t.
	(Verify): Likewise for gpgme_verify_result_t.

gpgme/
2005-07-27  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (gpgme_status_code_t): Add GPGME_STATUS_PLAINTEXT.
	(struct _gpgme_op_decrypt_result): New member plaintext_filename.
	(struct _gpgme_op_verify_result): Likewise.
	* ops.h (_gpgme_parse_plaintext): Add prototype.
	* op-support.c (_gpgme_parse_plaintext): New function.
	* decrypt.c (release_op_data): Release
	OPD->result.plaintext_filename.
	(_gpgme_decrypt_status_handler): Handle GPGME_STATUS_PLAINTEXT.
	* verify.c (release_op_data): Release
	OPD->result.plaintext_filename.
	(_gpgme_verify_status_handler): Handle GPGME_STATUS_PLAINTEXT.
2005-07-27 01:50:08 +00:00
Marcus Brinkmann
fcddcb674e doc/
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 19:41:56 +00:00
Marcus Brinkmann
b8440749f1 doc/
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-06-03 00:42:08 +00:00
Marcus Brinkmann
749ed3a258 2005-05-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Listing Mode): Fix return type of
	gpgme_set_keylist_mode.
	Reported by "Sergio" <ml_sergico@virgilio.it>.
2005-05-28 20:09:20 +00:00
Marcus Brinkmann
02a1dbee30 doc/
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.
2005-04-28 16:11:34 +00:00
Marcus Brinkmann
d45f97f185 2005-01-12 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Engine Configuration): New section.
	(Crypto Engine): New subsection.
2005-01-12 11:13:17 +00:00
Marcus Brinkmann
31c6be048f 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* lesser.texi (Library Copying): Change from @appendixsec to
        @appendix.
        * gpgme.texi (Features): Change reference to GPL to one to LGPL.
2004-12-07 21:21:41 +00:00
Marcus Brinkmann
71775ad8fc 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* 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-12-07 21:13:39 +00:00
Marcus Brinkmann
d40de0d14f 2004-12-07 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Creating Contexts): Fix cut&paste error.  Reported
	by Noel Torres <envite@rolamasao.org>.
2004-12-07 19:05:18 +00:00
Marcus Brinkmann
5b667d74fa 2004-09-30 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (gpgme_TEXINFOS): Remove fdl.texi.
	* gpgme.texi: Do not include fdl.texi.  Change license to GPL.
	* fdl.texi: File removed.
2004-09-30 02:11:18 +00:00
Marcus Brinkmann
cc769c66ed doc/
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.
2004-09-28 23:15:39 +00:00
Marcus Brinkmann
9a2a72db08 2004-09-28 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Passphrase Callback): Fix last change.
2004-09-28 11:42:06 +00:00
Marcus Brinkmann
b8b44c4767 2004-09-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Passphrase Callback): Document
	GPG_ERR_NOT_IMPLEMENTED.
2004-09-27 20:24:48 +00:00
Marcus Brinkmann
ae7ead80a0 2004-09-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi: Update copyright year for tex version.
2004-09-27 15:23:26 +00:00
Moritz Schulte
b2c86ab705 2004-07-29 Moritz Schulte <moritz@g10code.com>
* gpgme.texi (Verify): Fix gpgme_get_key example (ancient
	force_update argument was still there).
2004-07-29 20:46:43 +00:00
Marcus Brinkmann
99011b0b8d 2004-06-08 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Listing Keys): Elaborate on the length restrictions
	on search patterns.
2004-06-08 17:39:40 +00:00
Marcus Brinkmann
5236702f6f 2004-06-08 Marcus Brinkmann <marcus@g10code.de>
* 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-06-08 17:26:48 +00:00
Marcus Brinkmann
ae1e3748d7 2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgme.text (Verify): Document GPG_ERR_CERT_REVOKED status.
2004-05-21 16:38:59 +00:00
Marcus Brinkmann
cf6910f69d doc/
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 15:51:53 +00:00
Marcus Brinkmann
6aeee0426a doc/
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-05-21 15:15:21 +00:00
Marcus Brinkmann
3e64cff5f8 2004-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Verify): Correct type of member wrong_key_usage.
2004-04-29 21:19:30 +00:00
Moritz Schulte
78cdfffd92 2004-03-29 Moritz Schulte <moritz@duesseldorf.ccc.de>
* gpgme.texi (Verify): Fix type of gpgme_op_verify_result.
	* gpgme.texi (Key Listing Mode): Typo fix.
2004-03-29 18:42:41 +00:00
Marcus Brinkmann
e17289e77c 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Library Version Check): Fix the instruction when to
	set the locale.
2004-03-23 13:43:37 +00:00
Marcus Brinkmann
887c31aa0a 2004-03-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (I/O Callback Example Qt): New section by Marc Mutz.
2004-03-07 22:32:49 +00:00
Marcus Brinkmann
52cf0dda67 2004-03-03 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (I/O Callback Example Qt): New section by Marc Mutz.
2004-03-03 16:11:41 +00:00
Marcus Brinkmann
ed314ff766 doc/
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.
2004-02-24 23:08:48 +00:00
Werner Koch
afabac4c9d * gpgme.texi (Key Listing Mode): Doc KEYLIST_MODE_VALIDATE.
* gpgme.h: Add GPGME_KEYLIST_MODE_VALIDATE.
* engine-gpgsm.c (gpgsm_keylist): Send this to gpgsm.
2004-02-17 15:27:42 +00:00
Moritz Schulte
a4bbdd6cbd 2004-02-06 Moritz Schulte <mo@g10code.com>
* gpgme.texi: A couple of small fixes regarding the Largfile
	Support section.
2004-02-06 15:47:15 +00:00
Marcus Brinkmann
68ab067358 2004-01-31 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Add invocation of AC_SYS_LARGEFILE, AC_TYPE_OFF_T
	and AC_FUNC_FSEEKO.

doc/
2004-02-01  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Largefile Support): New section.

gpgme/
2004-02-01  Marcus Brinkmann  <marcus@g10code.de>

	* data-compat.c (gpgme_data_new_from_filepart): Call fseeko if
	available.
	* data-stream.c (stream_seek): Likewise.
2004-02-01 13:39:45 +00:00
Marcus Brinkmann
6d47796aa6 2004-01-13 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Key Management): Fix exportable field.
2004-01-13 21:43:25 +00:00
Werner Koch
615321b796 Added files usually installed bu automake. We want to keep them in the CVS
from now on.
2004-01-12 13:49:11 +00:00
Marcus Brinkmann
de739f876b doc/
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-12-25 14:38:40 +00:00
Moritz Schulte
a3d1b15db2 2003-12-23 Moritz Schulte <mo@g10code.com>
* gpgme.texi (Listing Keys): Minor clarification for
	gpgme_get_key.
2003-12-23 09:08:06 +00:00
Marcus Brinkmann
0d0378a200 doc/
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-10-06 16:17:13 +00:00
Marcus Brinkmann
b4473cfffd doc/
2003-09-14  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Multi Threading): Correct documentation on memory
	synchronization requirement.

tests/
2003-09-14  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-thread1.c (main): Call init_gpgme here.
	(initialize_gpgme): Function removed.
2003-09-14 14:48:48 +00:00
Marcus Brinkmann
256ef2e87e doc/
2003-09-14  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Locale): New section.
	(Multi Threading): Set locale in example.

gpgme/
2003-09-14  Marcus Brinkmann  <marcus@g10code.de>

	* context.h (struct gpgme_context): New members lc_ctype and
	lc_messages.
	* gpgme.c: Include <locale.h>.
	(def_lc_lock, def_lc_ctype, def_lc_messages): New static
	variables.
	(gpgme_set_locale): New function.
	* engine.c (_gpgme_engine_new): Add arguments lc_ctype and
	lc_messages.
	* engine.h (_gpgme_engine_new): Likewise.
	* engine-gpgsm.c (gpgsm_new): Likewise.
	* rungpg.c (gpg_new): Likewise.
	* engine-backend.h (struct engine_ops): Likewise to NEW.
	* op-support.c (_gpgme_op_reset): Likewise to invocation of
	_gpgme_engine_new.
2003-09-14 00:02:41 +00:00
Marcus Brinkmann
c4ea1235d5 doc/
2003-09-13  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Error Strings): Add gpgme_strerror_r.

gpgme/
2003-09-13  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (gpgme_strerror_r): New prototype.
	* error.c (gpgme_strerror_r): New function.
2003-09-13 21:45:13 +00:00
Marcus Brinkmann
33912dcc86 2003-09-13 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Multi Threading): Update documentation.
2003-09-13 18:04:16 +00:00
Marcus Brinkmann
d772a96a62 2003-09-03 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Remove GPGME_CONFIG_LIBS and GPGME_CONFIG_CFLAGS.

doc/
2003-09-03  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Header): We don't use the assuan namespace anymore.
	Document new thread options.

gpgme/
2003-09-03  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme-config.in: Rewritten.
	* gpgme.m4: Rewritten.
2003-09-03 01:15:56 +00:00
Marcus Brinkmann
694e2a8041 doc/
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-14 17:32:18 +00:00
Marcus Brinkmann
275ef15b0b doc/
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-08-04 21:11:11 +00:00
Marcus Brinkmann
9d0642c012 doc/
2003-07-31  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Key Management): Add can_authenticate flag.

gpgme/
2003-07-31  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h (struct _gpgme_subkey): Add flag CAN_AUTHENTICATE.
	Lower _UNUSED to 23 bits.
	(struct _gpgme_key): Likewise.
	* keylist.c (set_mainkey_capability): Support 'a' and 'A'.
	(set_subkey_capability): Support 'a'.
2003-07-31 16:59:36 +00:00
Marcus Brinkmann
82f7a68aa2 doc/
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.
2003-07-31 16:01:13 +00:00
Marcus Brinkmann
235e4e8eac 2003-07-29 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (EXTRA_DIST): Remove variable.
2003-07-29 18:49:06 +00:00
Marcus Brinkmann
14c928fb91 2003-07-29 Marcus Brinkmann <marcus@g10code.de>
* 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.
2003-07-29 18:46:30 +00:00
Marcus Brinkmann
50bc3d654b 2003-07-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Creating a Signature): Document
	GPG_ERR_UNUSABLE_SECKEY.
2003-07-29 18:31:46 +00:00
Marcus Brinkmann
40343b5f4a 2003-07-29 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Encrypting a Plaintext): Mention encrypt and sign
	operations in result function.
	(Creating a Signature): Likewise.
2003-07-29 18:25:27 +00:00
Marcus Brinkmann
0e4157b1d0 2003-07-23 Marcus Brinkmann <marcus@g10code.de>
* 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.
2003-07-28 12:09:42 +00:00
Marcus Brinkmann
c605cb3b77 2003-07-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Error Sources): Fix cut and paste error.
2003-07-22 12:19:32 +00:00
Marcus Brinkmann
708e6d984e 2003-07-09 Marcus Brinkmann <marcus@g10code.de>
* 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-07-09 00:49:58 +00:00
Marcus Brinkmann
3dc6488cae 2003-07-08 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Progress Meter Callback): Change return type of
	gpgme_progress_cb_t to void.
2003-07-08 17:22:44 +00:00
Marcus Brinkmann
4975c762c6 2003-06-22 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi: Add 2003 to copyright notice.

	* gpgme.texi (Header): Fix name space documentation on
	libgpg-error.
2003-06-22 21:09:58 +00:00
Marcus Brinkmann
7b1bac188f doc/
2003-06-22  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Multi Threading): Remove reference to
	gpgme_recipients_t.

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

	* gpgme.h (gpgme_user_ids_release, gpgme_user_ids_append): Remove
	prototypes.
2003-06-22 12:26:11 +00:00
Marcus Brinkmann
a8fe22ca6b doc/
2003-06-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Crypto Operations): Rename gpgme_invalid_user_id_t
	to gpgme_invalid_key_t.

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

	* op-support.c (_gpgme_parse_inv_userid): Rename to
	_gpgme_parse_inv_recp and change to new datatype.
	* ops.h (_gpgme_parse_inv_key): Fix prototype.
	* gpgme.h (struct _gpgme_invalid_user_id): Rename to
	__gpgme_invalid_key.  Rename field ID to KEY.
	(gpgme_invalid_user_id_t): Rename to gpgme_invalid_key_t.
	(struct _gpgme_op_encrypt_result): Here, too.
	(struct _gpgme_op_sign_result): Likewise.
	* encrypt.c (struct op_data): Likewise.
	(release_op_data): Likewise.
	* sign.c (struct op_data): Likewise.
	(release_op_data): Likewise.
2003-06-06 00:56:03 +00:00
Marcus Brinkmann
02536bb72b doc/
2003-06-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi: Change error codes to GPG_ERR_* variants.
	(Error Handling): Rewritten.

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

	Everywhere: Use libgpg-error error codes.

	* Makefile.am (EXTRA_DIST): Remove mkerrors.
	(BUILT_SOURCES): Remove errors.c.
	(MOSTLYCLEANFILES): Likewise.
	(libgpgme_la_SOURCES): Likewise.  Add error.c.
	(errors.c): Remove target.
	* mkerrors: File removed.
	* error.c: New file.

	* gpgme.h (gpgme_error_t): Change to type gpg_error_t.
	(gpgme_err_code_t, gpgme_err_source_t): New types.
	(gpgme_err_code, gpgme_err_source, gpgme_error, gpgme_err_make):
	New static inline functions.
	(gpgme_strsource, gpgme_err_code_from_errno,
	gpgme_err_code_to_errno, gpgme_err_make_from_errno,
	gpgme_error_from_errno): New prototypes.

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

	Everywhere: Use libgpg-error error codes.

	* gpg/Makefile.am (noinst_HEADERS): New variable.
	* gpg/t-support.h: New file.
	* gpgsm/Makefile.am (noinst_HEADERS): New variable.
	* gpgsm/t-support.h: New file.
2003-06-05 23:20:29 +00:00
Marcus Brinkmann
8f8c78d534 doc/
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-29 03:21:02 +00:00
Marcus Brinkmann
bade4a32b5 doc/
2003-05-28  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Exporting Keys): Change argument type from
	gpgme_recipient_t to gpgme_user_id_t.
	(Encrypting a Plaintext): Likewise.
	(Selecting Recipients): Rewritten.

gpgme/
2003-05-28  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (libgpgme_la_SOURCES): Remove recipient.c, add
	user-id.c.
	* gpgme.h (gpgme_recipients_t): Removed.
	(gpgme_recipients_new, gpgme_recipients_release,
	gpgme_recipients_add_name,
	gpgme_recipients_add_name_with_validity, gpgme_recipients_count,
	gpgme_recipients_enum_open, gpgme_recipients_enum_read,
	gpgme_recipients_enum_close): Removed.
	(gpgme_op_encrypt, gpgme_op_encrypt_start, gpgme_op_encrypt_sign,
	gpgme_op_encrypt_sign_start, gpgme_op_export_start,
	gpgme_op_export): Change second argument to gpgme_user_id_t.
	(gpgme_user_ids_release): New prototype.
	(gpgme_user_ids_append): Likewise.
	* ops.h (_gpgme_recipients_all_valid): Remove.
	(_gpgme_user_ids_all_valid): Add.
	* context.h (struct gpgme_recipients): Removed.
	* user-id.c: New file.
	* recipient.c: Removed file.
	* rungpg.c (append_args_from_recipients): Change last arg to
	gpgme_user_id_t.  Reimplement.
	(gpg_encrypt): Change second arg to gpgme_user_id_t.
	(gpg_encrypt_sign): Likewise.
	(gpg_export): Likewise.  Rewrite user ID list code.
	* engine.c (_gpgme_engine_op_encrypt): Change second arg to
	gpgme_user_id_t.
	(_gpgme_engine_op_encrypt_sign): Likewise.
	(_gpgme_engine_op_export): Likewise.
	* engine.h (_gpgme_engine_op_encrypt, _gpgme_engine_op_encrypt_sign,
	_gpgme_engine_op_export): Likewise.
	* engine-gpgsm.c (set_recipients): Likewise.  Rewrite loop code.
	(gpgsm_encrypt): Likewise.
	(gpgsm_export): Likewise.
	* engine-backend.h (struct engine_ops): Likewise for members
	ENCRYPT, ENCRYPT_SIGN and EXPORT.
	* export.c (export_start, gpgme_op_export_start, gpgme_op_export):
	Likewise.
	* encrypt.c (encrypt_start): Likewise.  Don't check for count of
	recipients.
	(gpgme_op_encrypt_start): Likewise.
	(gpgme_op_encrypt): Likewise.
	* encrypt-sign.c (encrypt_sign_start): Likewise.
	(gpgme_op_encrypt_sign): Likewise.
	(gpgme_op_encrypt_sign_start): Likewise.

tests/
2003-05-28  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-eventloop.c (main): Rewrite recipient management.
	* gpg/t-encrypt-sign.c (main): Likewise.
	* gpg/t-encrypt.c (main): Likewise.
	* gpg/t-export.c (main): Likewise.
2003-05-28 01:15:38 +00:00
Marcus Brinkmann
ef83cb47d6 Fix last change. 2003-05-27 05:45:06 +00:00
Marcus Brinkmann
569509758a 2003-05-27 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Protocol Selection): Do not use @acronym in @node
	because that breaks texi2dvi.
2003-05-27 05:41:43 +00:00
Marcus Brinkmann
03bcb7f4c1 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.
2003-05-27 01:31:06 +00:00
Marcus Brinkmann
0a882398e1 2003-05-18 Marcus Brinkmann <marcus@g10code.de>
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-05-18 20:45:24 +00:00
Marcus Brinkmann
75f91eed40 2003-05-04 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Listing Keys): Document what happens if key is not
	found.
2003-05-04 20:49:44 +00:00
Marcus Brinkmann
05821e49da 2003-05-04 Marcus Brinkmann <marcus@g10code.de>
* gpgme.texi (Importing Keys): Fix cut and paste error.
2003-05-04 14:57:24 +00:00
Marcus Brinkmann
102e973a9b doc/
2003-04-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Encrypting a Plaintext): Remove reference to
	gpgme_get_op_info.
	(Detailed Results): Subsection removed.

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

	* gpgme.h (gpgme_get_op_info): Remove prototype.
	* ops.h (_gpgme_set_op_info,
	_gpgme_data_release_and_return_string, _gpgme_data_get_as_string,
	_gpgme_data_append, _gpgme_data_append_string,
	_gpgme_data_append_string_for_xml, _gpgme_data_append_for_xml,
	_gpgme_data_append_percentstring_for_xml): Likewise.
	(_gpgme_progress_status_handler): Change first arg to void *.
	* progress.c (_gpgme_progress_status_handler): Likewise.
	* conversion.c: Do not include <string.h>, <errno.h>, <ctype.h>,
	and <sys/types.h>, but <string.h>.
	(_gpgme_data_append): Remove function.
	(_gpgme_data_append_string): Likewise.
	(_gpgme_data_append_for_xml): Likewise.
	(_gpgme_data_append_string_for_xml): Likewise.
	(_gpgme_data_append_percentstring_for_xml): Likewise.
	* data-mem.c (_gpgme_data_get_as_string): Likewise.
	(_gpgme_data_release_and_return_string): Likewise.
	* gpgme.c (gpgme_get_op_info): Likewise.
	(_gpgme_set_op_info): Likewise.

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

	* gpg/t-eventloop.c (main): Do not call print_op_info.
	(print_op_info): Function removed.
2003-04-30 03:34:30 +00:00
Marcus Brinkmann
ba333bf07e doc/
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-30 03:02:50 +00:00
Marcus Brinkmann
984d611a43 doc/
2003-04-29  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Listing Keys): Remove force_update argument from
	gpgme_get_key.

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

	* gpgme.h (gpgme_get_key): Remove force_update argument.
	* key-cache.c: File removed.
	* Makefile.am (libgpgme_la_SOURCES): Remove key-cache.c.
	* ops.h (_gpgme_key_cache_add, _gpgme_key_cache_get): Remove
	prototypes.
	* keylist.c (_gpgme_op_keylist_event_cb): Don't call
	_gpgme_key_cache_add.
	(gpgme_get_key): New function.
	* verify.c (gpgme_get_sig_key): Remove last argument to
	gpgme_get_key invocation.
2003-04-29 22:24:37 +00:00
Marcus Brinkmann
c476829aba doc/
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-29 21:53:58 +00:00
Marcus Brinkmann
30cdf13284 doc/
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 23:59:03 +00:00
Marcus Brinkmann
174e293252 doc/
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-28 21:17:15 +00:00
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