Commit Graph

415 Commits

Author SHA1 Message Date
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
02ba35c1b6 Locate engine names only at runtime and prefer GnuPG-2.
* configure.ac (NEED_GPG_VERSION, NEED_GPGSM_VERSION)
(NEED_G13_VERSION, NEED_GPGCONF_VERSION): Remove vars and all related
checks.  Do not check for any engine version.
(HAVE_ASSUAN): Remove AM conditional.
* src/Makefile.am: Remove separate component vars and always build all
engines but uiserver.
* src/dirinfo.c (WANT_GPGCONF_NAME): New.
(struct dirinfo): Add field gpgconf_name.
(_gpgme_get_default_gpgconf_name): Use WANT_GPGCONF_NAME.
(get_gpgconf_item): Set gpgconf name and adjust for _gpgme_get_*_path
now returning a malloced string.
* src/engine.c (engine_ops): Always init all engines except for
uiserver.
* src/posix-util.c (_gpgme_get_gpgsm_path, _gpgme_get_g13_path):
Remove unused functions.
(walk_path): New.
(_gpgme_get_gpg_path, _gpgme_get_gpgconf_path ): Re-implement using
walk_path.
* src/w32-util.c (_gpgme_get_gpgsm_path, _gpgme_get_g13_path): Remove
unused functions.
(_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Return a malloced
string.
* src/engine-g13.c (g13_get_req_version): Use a hardwired string with
the required version.  This info belongs into this file.
* src/engine-gpg.c (gpg_get_req_version): Ditto.
* src/engine-gpgconf.c (gpgconf_get_req_version): Ditto.
* src/engine-gpgsm.c (gpgsm_get_req_version): Ditto.
* tests/t-engine-info.c: Replace now useless test by an info output.
* tests/gpg/Makefile.am (GPG, GPG_AGENT): Hardwire gpg and gpg-agent.
* tests/gpgsm/Makefile.am (GPGSM): Hardwire gpgsm.

Signed-off-by: Werner Koch <wk@gnupg.org>
2013-12-27 16:08:20 +01:00
Werner Koch
eae9c32bd9 tests: Fix NULL ptr deref in gpgsm/t-verify.
* tests/gpgsm/t-verify.c (check_result): Do not dereference a sig or
sig->fpr if NULL.
2013-08-19 20:38:36 +02:00
Werner Koch
3ca7e96e38 Make test suite workable with GnuPG 2.1.
* tests/gpg/start-stop-agent: New.
* tests/gpg/initial.test: New.
* tests/gpg/final.test: New.
* tests/gpg/Makefile.am (c_tests): New.
(TESTS): Move all to c_tests.  Add initial.test, final.test, and
c_tests.
(TESTS_ENVIRONMENT): Add C_ALL=C
(private_keys): New.
(EXTRA_DIST): Add new files.
(./private-keys-v1.d/gpg-sample.stamp): Copy private keys.
(all-local): Depend on gpg-sample.stamp.
* tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F: New.
* tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD: New.
* tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66: New.
* tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C: New.
* tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New.
--

GnuPG 2.1 requires that the agent knows the private keys.  Thus we
need to install them.  The code should still work with GnuPG < 2.1.

To make the whole testing using a agent more robust, the way to start
the agent has also be changed.
2013-08-12 14:32:21 +02:00
Werner Koch
567e6481d7 Allow symmetric encryption with gpgme_op_encrypt_sign.
* src/encrypt-sign.c (encrypt_sym_status_handler): New.
(encrypt_sign_start): Handle recp == NULL case.
* src/engine-gpg.c (gpg_encrypt_sign): Implement symmetric encryption.
* tests/gpg/t-encrypt-sign.c (main): Add a test case for this.
--

Co-authored-by: Kyle L. Huff <g10bts@curetheitch.com>
GnuPG-bug-id: 1440
2013-05-22 16:31:51 +02:00
Werner Koch
18254f88f8 tests: Print auditlog in plain text format.
* tests/gpgsm/t-verify.c (show_auditlog): Use plain text format.
--

The HTML output is not very helpful on the console and a pain to the
eyes.
2013-05-22 15:03:57 +02:00
Werner Koch
d8b46c919f Change the various version numbers to the new scheme.
* configure.ac: Rename my_foo variables to mym4_foo variables to make
clear that they are processed by m4.
(VERSION_NUMBER): New ac_subst.
(AH_BOTTOM): Add CRIGHTBLURB macro.
(BUILD_REVISION, BUILD_FILEVERSION, BUILD_TIMESTAMP): Change them to
work similar to libgpg-error et al.
* src/versioninfo.rc.in: Remove use of BUILD_NUMBER and get it in line
with gpg-error et al.
* src/version.c (cright_blurb): New.
(gpgme_check_version_internal): Add magic to display the above
information.
* tests/t-version.c (main): Add option --verbose.
2013-02-26 17:10:18 +01:00
Werner Koch
cc59b75b21 tests: Adhere to the docs and call gpgme_check_version.
* tests/t-engine-info.c: Call gpgme_check_version.
2012-10-24 16:07:31 +02:00
Werner Koch
139e798c87 Remove all trailing whitespace from source files
--
Command used:  sed -i 's,[ \t]*$,,' FILE
2012-09-25 15:29:49 +02:00
W. Trevor King
4cb408d33e .gitignore: flesh out rules and add subdirectory-.gitignores. 2012-04-20 16:05:11 +02:00
Marcus Brinkmann
dae3073aaa Use gpgme interface for error handling to avoid linking with gpg-error.
* tests/t-data.c, tests/run-export.c, tests/run-keylist.c,
tests/run-support.h, tests/run-verify.c, tests/gpg/t-decrypt-verify.c,
tests/gpg/t-edit.c, tests/gpg/t-eventloop.c, tests/gpg/t-keylist-sig.c,
tests/gpg/t-keylist.c, tests/gpg/t-support.h, tests/gpg/t-trustlist.c,
tests/gpg/t-verify.c, tests/gpg/t-wait.c, tests/gpgsm/cms-decrypt.c,
tests/gpgsm/cms-keylist.c, tests/gpgsm/t-keylist.c,
tests/gpgsm/t-support.h, tests/gpgsm/t-verify.c,
tests/opassuan/t-command.c: Use gpgme interface for gpg-error functions.
2012-02-08 15:26:17 +01:00
Marcus Brinkmann
0052a72f89 Link the thread test to pthread.
* tests/gpg/Makefile.am (t_thread1_LDADD): Add -lpthread.
2012-02-08 15:19:33 +01: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
d11500a77e Clean up the tests correctly. 2011-05-11 02:32:20 +02:00
Marcus Brinkmann
c79d8ad818 Make sure an existing agent doesn't interfere with test suite generation. 2011-05-06 02:11:40 +02:00
Marcus Brinkmann
470899e3a7 Improve import tests for GnuPG 2.1. 2011-05-04 00:52:11 +02:00
Marcus Brinkmann
43f38db1af Update GPGME test suite for use with GnuPG 2.1. 2011-04-27 18:03:46 +02:00
Werner Koch
fc0fd88d7f Prepare for a new protocol.
Comment clarification.
2009-11-03 20:27:35 +00:00
Marcus Brinkmann
c8e934b276 2009-10-26 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_GPG_VERSION_DEFAULT): Bump to 1.4.0 as 1.3.0
	was development versions only.

tests/
2009-10-26  Marcus Brinkmann  <marcus@g10code.de>

	* opassuan/t-command.c: Update to new interface.

src/
2009-10-26  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.h.in (struct gpgme_io_event_done_data)
	(gpgme_io_event_done_data_t): New types.
	(struct _gpgme_op_assuan_result): Deprecate the err member.
	(gpgme_op_assuan_result): Deprecate (for now).
	(gpgme_op_assuan_transact_ext): New prototype.
	(gpgme_op_assuan_transact): Deprecate.
	(struct _gpgme_op_g13_result): Replace with ...
	(struct _gpgme_op_vfs_mount_result): ... this.
	(gpgme_op_g13_mount): Replace with ...
	(gpgme_op_vfs_mount): ... this.
	* gpgme.def (gpgme_op_assuan_transact_ext, gpgme_wait_ext)
	(gpgme_op_vfs_mount_result, gpgme_op_vfs_mount): New.
	(gpgme_op_g13_mount): Remove.
	* libgpgme.vers: Likewise.
	* engine-backend.h (struct engine_ops): Remove RESULT_CB and
	RESULT_CB_VALUE args in opassuan_transact member.  Add CANCEL_OP
	member.
	* ops.h (_gpgme_cancel_with_err, _gpgme_wait_on_condition): Add
	OP_ERR argument.
	(_gpgme_wait_one_ext): New prototype.
	* context.h (ctx_op_data_id_t): Add OPDATA_VFS_MOUNT.
	* engine-g13.c (g13_cancel_op): New function.
	(parse_status): Remove declaration.
	(g13_assuan_simple_command): Do nothing with status lines for now.
	(status_handler): Update opaque value access.
	(_gpgme_engine_ops_g13): Add new cancel_op member.
	* gpgme.c (_gpgme_cancel_with_err): Add new parameter OP_ERR.
	Handle operational errors.
	(gpgme_cancel, gpgme_io_read, gpgme_io_write): Add debug output.
	* data.c (_gpgme_data_inbound_handler)
	(_gpgme_data_outbound_handler): Adjust opaque value access.
	* engine-gpg.c (command_handler, status_handler)
	(colon_line_handler): Likewise.
	* engine-gpgsm.c (status_handler): Likewise.
	* engine-gpg.c (_gpgme_engine_ops_gpg): Add cancel_op member.
	* engine-gpgsm.c (_gpgme_engine_ops_gpgsm): Likewise.
	* g13.c: Rewritten (and will be rewritten again).
	* engine.h (_gpgme_engine_op_assuan_transact): Remove result_cb
	and result_cb_value parameters from prototype.
	(_gpgme_engine_cancel_op): New prototype.
	* engine.c (engine_ops) [! ENABLE_ASSUAN]: Add missing comma.
	(_gpgme_engine_op_assuan_transact): Remove result_cb and
	result_cb_value parameter.
	(_gpgme_engine_cancel_op): New function.
	* wait.h (_gpgme_run_io_cb): Add new argument OP_ERR.
	(struct io_cb_data): New struct to pass opaque data and get a
	op_err return value.  Needed because we can't modify I/O callback
	handler signature because it is exposed to the user.
	* wait.c (_gpgme_run_io_cb): Add OP_ERR parameter.  Handle
	operational errors.
	* wait-user.c (_gpgme_user_io_cb_handler): Handle operational
	errors.
	* wait-private.c (_gpgme_wait_on_condition): New argument to
	retrieve the operational result.  Handle operational errors in
	session based protocols.
	(_gpgme_wait_one_ext): New function.
	(_gpgme_wait_one): Pass argument in invocation of
	_gpgme_wait_on_condition.
	* wait-global.c (struct ctx_list_item): Add member OP_ERR.
	(ctx_done): New argument OP_ERR.
	(ctx_wait): New argument OP_ERR.
	(gpgme_wait_ext): New function based on gpgme_wait but handling
	operational errors.
	(gpgme_wait): Implement in term of gpgme_wait_ext.
	* keylist.c (gpgme_op_keylist_next): Pass argument in invocation
	of _gpgme_wait_on_condition.
	* trustlist.c (gpgme_op_trustlist_next): Pass argument in
	invocation of _gpgme_wait_on_condition.
	* engine-assuan.c (struct engine_llass): Replace members RESULT_CB
	and RESULT_CB_VALUE by LAST_OP_ERR.
	(_gpgme_engine_assuan_last_op_err): Add this hack function.
	(llass_cancel_op): New function.
	(_gpgme_engine_llass_ops): Add cancel_op member.
	(llass_status_handler): Update opaque value access.
	(llass_transact): Remove RESULT_CB and RESULT_CB_VALUE arguments.
	* opassuan.c: Move compat hacks to the end of file.
	(opassuan_start): Do not set OPD->result.err.
	Do not pass RESULT_Cb and CTX to _gpgme_engine_op_assuan_transact.
	(gpgme_op_assuan_transact_ext): New function.
2009-10-26 18:52:32 +00:00
Werner Koch
06e22ca339 Add new debug helper 2009-10-15 20:54:25 +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
54719f4937 Add issing file. 2009-07-08 11:49:18 +00:00
Werner Koch
b996b0540a Inmplement import from keys for GPGSM.
Add option --cms to run-keylist test program.
2009-07-07 14:33:10 +00:00
Werner Koch
43427b0c91 Move gpg test programs to the top test directory. 2009-07-07 14:17:39 +00:00
Marcus Brinkmann
1c454aee81 2009-06-22 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Add AC_TYPE_UINTPTR_T.

	* assuan/assuan.h [_ASSUAN_IN_GPGME_BUILD_ASSUAN]: Declare
	_gpgme_io_connect.

src/
2009-06-22  Marcus Brinkmann  <marcus@g10code.de>

	* debug.h: Everywhere, use %p instead of 0x%x to print pointer.
	[HAVE_STDINT_H]: Include <stdint.h>.
	(_TRACE, TRACE, TRACE0, TRACE1, TRACE2, TRACE3, TRACE6): Cast tag
	to (uintptr_t) before casting it to (void*) to silence GCC
	warning.

	* gpgme.h.in (_GPGME_DEPRECATED_OUTSIDE_GPGME): New macro.
	* sign.c (_GPGME_IN_GPGME): Define it.
	* keylist.c (_GPGME_IN_GPGME): Define it.

	* debug.c (_gpgme_debug_begin, _gpgme_debug_add): Handle error in
	vasprintf and asprintf.

	* priv-io.h: Include <sys/socket.h>.  Declare _gpgme_io_connect.

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

	* gpg/t-support.h (passphrase_cb): Implement write() according to
	the book to silence compiler warning.
	* gpgsm/t-support.h (passphrase_cb): Likewise.
2009-06-22 14:50:17 +00:00
Werner Koch
bebd9cbe29 Add support for gpg --fetch-keys. 2009-06-16 15:42:37 +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
Werner Koch
caf36ce1ce Add gpgme_io_write and gpgme_io_read.
Minor cleanups.
2009-06-09 16:01:02 +00:00
Moritz Schulte
edf19bbf8f * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Specify --with-gpg.
* gpg/Makefile.am (EXTRA_DIST): Replaced mkdemodirs with mkdemodirs.in.
(mkdemodirs): New target.
(clean-local): Added command for removing mkdemodirs script.
(./Alpha/Secret.gpg): Added dependency on mkdemodirs.

* gpg/mkdemodirs: Renamed to ...
* gpg/mkdemodirs.in: ... here.
* gpg/mkdemodirs.in (GPG): Derive value from @GPG@ instead of hard-coding "gpg".
2009-04-19 18:03:49 +00:00
Werner Koch
f0dccac380 Chnaged the op-assuan interface. 2009-02-24 15:13:01 +00:00
Werner Koch
259cbefd5c Provide inforation about smartcards. 2009-02-04 09:51:43 +00:00
Werner Koch
d951cb713f First take on the low-level assuan interface. 2009-01-26 10:21:10 +00:00
Marcus Brinkmann
6d93f41f05 2008-12-03 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (INCLUDES): Fix path to include file.
	* gpg/Makefile.am (INCLUDES), gpgsm/Makefile.am (INCLUDES): Likewise.
2008-12-03 14:27:52 +00:00
Werner Koch
92394f92d4 Fix SIGPIPE ignoring regression.
Fix unsupported algorithm detection.
2008-11-18 11:12:36 +00:00
Marcus Brinkmann
66d0fa1973 008-11-03 Marcus Brinkmann <marcus@g10code.com>
* configure.ac: Replace gpgme paths with src.
        * gpgme: Move to ...
        * src: ... this new directory.

assuan/
2008-11-03  Marcus Brinkmann  <marcus@g10code.com>

	* Makefile.am (INCLUDES): Replace gpgme path with src.

tests/
2008-11-03  Marcus Brinkmann  <marcus@g10code.com>

        * gpgsm/Makefile.am (INCLUDES, LDADD): Replace gpgme path with src.
        * gpg/Makefile.am (INCLUDES, LDADD, t_thread1_LDADD): Likewise.
	* Makefile.am (LDADD): Likewise.
2008-11-03 17:24:09 +00:00
Werner Koch
9c7489e8d1 use validated mode. 2008-10-30 14:41:23 +00:00
Werner Koch
66c64cfa05 new debug helper program 2008-10-30 13:23:42 +00:00
Werner Koch
63ea0d6663 Add example.
Update gpgconf test.
2008-06-19 18:38:28 +00:00
Marcus Brinkmann
2b5033018f 2008-01-28 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (DISTCLEANFILES): Add pubring.kbx~.
2008-01-28 19:49:40 +00:00
Marcus Brinkmann
38c5950991 2008-01-10 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-gpgconf.c (main): Allow for dirmngr not to be available.
2008-01-10 04:54:16 +00:00
Marcus Brinkmann
ade61e1311 2008-01-10 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (./gpg-agent.conf): Correct pinentry path.
2008-01-10 04:40:25 +00:00
Marcus Brinkmann
25dccf5897 2008-01-10 Marcus Brinkmann <marcus@g10code.de>
* gpg/pinentry: New file.
	* gpg/Makefile.am (DISTCLEANFILES, all-local): Add gpg-agent.conf
	(./gpg-agent.conf): New target.
	(EXTRA_DIST): Add pinentry.
2008-01-10 04:33:34 +00:00
Marcus Brinkmann
62a1429a5c 2008-01-10 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-gpgconf.c (main): Exit early if compiled without gpgconf.
2008-01-10 02:13:18 +00:00
Marcus Brinkmann
4028a0f390 2008-01-04 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (CLEANFILES): Add pubring.kbx and dirmngr.conf.
2008-01-04 14:40:45 +00:00
Marcus Brinkmann
19025d7918 2008-01-04 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Support gpgconf.

gpgme/
2008-01-04  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpgconf_components): New variable.
	(main_sources): Add gpgconf.c.
	* gpgme.h (gpgme_protocol_t): New protocol GPGME_PROTOCOL_GPGCONF.
	(gpgme_conf_level_t, gpgme_conf_type_t, gpgme_conf_arg_t)
	(gpgme_conf_opt_t, gpgme_conf_comp_t, gpgme_conf_arg_new)
	(gpgme_conf_arg_release, gpgme_conf_opt_change)
	(gpgme_conf_release, gpgme_op_conf_load, gpgme_op_conf_save): New
	types.
	* gpgconf.c, engine-gpgconf.c: New files.
	* engine.h: (_gpgme_engine_op_conf_load,
	(_gpgme_engine_op_conf_save): New prototypes.
	* op-support.c (_gpgme_op_reset): Ignore not implemented locale
	function.
	* posix-util.c (_gpgme_get_gpgconf_path): New function.
	* w32-util.c (_gpgme_get_gpgconf_path): New function.
	* engine-gpgsm.c:
	(_gpgme_engine_ops_gpgsm): Add stubs for conf_load and conf_save.
	* rungpg.c:
	(_gpgme_engine_ops_gpg): Add stubs for conf_load and conf_save.
	* gpgme.def: Add new gpgconf related interfaces.
	* libgpgme.vers: Likewise.
	* util.h (_gpgme_get_gpgconf_path): New prototype.
	* gpgme.h (gpgme_protocol_t): Add GPGME_PROTOCOL_GPGCONF.
	* engine-backend.h (_gpgme_engine_ops_gpgconf): New prototype.
	(struct engine_ops): Add members for conf_load and conf_save.
	* engine.c (engine_ops): Add _gpgme_engine_ops_gpgconf.
	(_gpgme_engine_op_conf_load,
	(_gpgme_engine_op_conf_save): New functions.
	(gpgme_get_engine_info): Allow protocol GPGME_PROTOCOL_GPGCONF.

tests/
2008-01-04  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (TESTS_ENVIRONMENT): Use absolute path for
	GNUPGHOME.
	* gpg/Makefile.am (TESTS_ENVIRONMENT): Use absolute path for
	GNUPGHOME.
	* gpgsm/Makefile.am (TESTS_ENVIRONMENT): Use absolute path for
	GNUPGHOME.
	* gpg/Makefile.am (TESTS): Add t-gpgconf.
	t-gpgconf.c: New file.
2008-01-04 14:31:15 +00:00
Werner Koch
38167ceddb Made autolog feature for if --enable-fd-passing has not been enabled.
Pass HTML glag to test program.
2007-11-26 10:59:11 +00:00
Marcus Brinkmann
f6ebf8638f 2007-11-23 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-verify.c (show_auditlog): Check for GPG_ERR_ASS_UNKNOWN_CMD.
2007-11-23 17:25:11 +00:00
Werner Koch
c07011580a Make getauditlog work. For now only when configured with --enable-fd-passing. 2007-11-23 13:07:04 +00:00
Werner Koch
4dbd2fbdfe New API gpgme_op_getauditlog. 2007-11-22 16:44:37 +00:00
Marcus Brinkmann
37ac53e74c 2007-09-27 Marcus Brinkmann <marcus@g10code.de>
* assuan-pipe-connect.c (pipe_connect_gpgme): Do not close process
	handle here.  Use this function also on Unix systems.

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

	* w32-glib-io.c (_gpgme_io_spawn),
	w32-qt-io.cpp (_gpgme_io_spawn), w32-io.c (_gpgme_io_spawn): Close
	the process handle, return 0.

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

	* t-engine-info.c (check_engine_info): Fix debug output.
	* gpg/Makefile.am (tests_unix): New variable.
	(TESTS): Use it.
	* gpg/t-support.h (passphrase_cb) [HAVE_W32_SYSTEM]: Use WriteFile instead of write.
	* gpg/t-wait.c [HAVE_W32_SYSTEM]: Define sleep as _sleep.
2007-09-27 13:01:54 +00:00
Marcus Brinkmann
5f726f4af7 2007-09-14 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-verify.c (main): Release TEXT and SIG.
2007-09-13 22:40:22 +00:00
Marcus Brinkmann
1ef14744a2 2007-07-12 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (key_id): Change := into =.
2007-07-12 18:26:51 +00:00
Werner Koch
906da085cf Changes for W32 2007-07-12 15:25:20 +00:00
Werner Koch
1786019d68 Detect and bailo out on double plaintext messages. 2007-02-26 10:36:08 +00:00
Marcus Brinkmann
68fc3075c3 2006-12-02 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-keylist.c (main): Skip unknown keys.  Newer versions of
	GPGSM import more keys than older ones.
2006-12-02 22:47:02 +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
deae5fa5a2 Add a test for expired subkeys 2005-10-19 08:23:23 +00:00
Marcus Brinkmann
81735c3e4c 2005-10-07 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-keylist.c (main): Allow for an email address as a second
	uid.
2005-10-07 13:34:22 +00:00
Marcus Brinkmann
2513557bf5 2005-10-07 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-sig-notation.c: Change critical notation to something
	GnuPG understands.
2005-10-06 23:28:50 +00:00
Marcus Brinkmann
bda9541b51 2005-10-01 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (EXTRA_DIST): Remove gpg.conf.
	(DISTCLEANFILES): Add gpg.conf.
	(all-local): Add gpg.conf.
	(./gpg.conf): New target.
	* gpg/gpg.conf: Remove file.
2005-10-01 20:41:41 +00:00
Marcus Brinkmann
efb2ed5a78 2005-10-01 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (EXTRA_DIST): Add gpg.conf.
2005-10-01 19:22:16 +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
Werner Koch
8a1ce95287 Boosted performance of w32 I/O 2005-09-23 13:29:04 +00:00
Marcus Brinkmann
30c821580d Restore the key files. 2005-09-08 15:17:58 +00:00
Marcus Brinkmann
172a8df25f gpgme/
2005-06-03  Marcus Brinkmann  <marcus@g10code.de>

	* wait-global.c (gpgme_wait): Break out of the fd processing loop
	after an error.
	Reported by Igor Belyi <gpgme@katehok.ac93.org>.

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

	* gpg/Makefile.am (TESTS): Add t-wait.
	* gpg/t-wait.c (main): New test.
2005-06-02 22:59: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
6d65ae9632 2004-08-17 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-keylist.c (struct): Add new fields VALIDITY and
	KEY_LENGTH.
	(main): Use them.
	* gpgsm/t-import.c (check_result): New argument total_stat.
	(main): Pass this argument.  Reduce number of total considered
	keys to 1 for the second test.
2004-08-17 21:13:20 +00:00
Werner Koch
edf5d2bd31 * gpgme.h: Add GPGME_STATUS_NEWSIG.
* gpgsm/Makefile.am: Changed the faked system time to 20011213T12000.
2004-04-05 18:40:10 +00:00
Marcus Brinkmann
af3c09d9b2 2004-03-07 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (NEED_GPGSM_VERSION): Bump up to 1.9.6.

2004-03-07  Marcus Brinkmann  <marcus@g10code.de>

	* gpgsm/t-keylist.c: Add chain IDs.
2004-03-07 22:49:42 +00:00
Werner Koch
e65396c735 * engine-gpgsm.c (gpgsm_export_ext): Properly insert a space
beween patterns.

* gpgsm/t-export.c (main): Also check exporting 2 certificates.
2004-03-03 15:15:41 +00:00
Werner Koch
91d3e5aa57 * gpgsm/t-import.c (check_result): gpgsm does now return info in
the result->imports; adjust for that.

* gpgsm/Makefile.am (TESTS_ENVIRONMENT): Reset the GPG_AGENT_INFO.

* gpg/t-keylist-sig.c (main): s/class/sig_class/.
* gpg/t-signers.c (check_result): Ditto.
* gpg/t-sign.c (check_result): Ditto.
* gpg/t-encrypt-sign.c (check_result): Ditto.
* gpgsm/t-sign.c (check_result): Ditto.
2004-02-17 17:26:20 +00:00
Werner Koch
215da10c1c About to release 0.4.4:
* configure.ac: Bumbed LT_Revision; now at C12/A1/R1.
(NEED_GPGSM_VERSION): Set to 1.9.3.

* sign.c: Include util.h for prototype of _gpgme_parse_timestamp.

* gpg/t-keylist-sig.c (main): Temporary disabled one test due top
gpg 1.3.4 problems.
* gpg/t-import.c (check_result): Likewise.
2004-01-12 13:28:36 +00:00
Werner Koch
82cb03cc83 * gpg/t-support.h (DIM): Added.
* gpg/t-verify.c (check_result): Rewrote test for notations
because the order of notaions is not guaranteed.

* gpgsm/t-support.h (fail_if_err): Also print the numeric values.
2003-11-19 15:15:33 +00:00
Marcus Brinkmann
91cc459641 2003-10-06 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-eventloop.c: Include <sys/types.h> for old systems.
2003-10-06 19:46:55 +00:00
Marcus Brinkmann
638c25eda4 2003-10-06 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (DISTCLEANFILES): Add random_seed.
2003-10-06 19:33:05 +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
0a952a59b6 2003-09-14 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-thread1.c: New file.
	* gpg/Makefile.am (TESTS): Add t-thread1.c.
	(t_thread1_LDADD): New variable.
	(LDADD): Remove GPG Error lib.
	* gpgsm/Makefile.am (LDADD): Likewise.
2003-09-14 01:32:41 +00:00
Marcus Brinkmann
38a0357afb Include "t-support.h". 2003-09-14 01:05:06 +00:00
Marcus Brinkmann
f8867f2707 2003-09-14 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-import.c (main): Likewise.
	* gpg/t-keylist-sig.c (main): Likewise.
	* gpg/t-keylist.c (main): Likewise.
	* gpg/t-sign.c (main): Likewise.
	* gpg/t-signers.c (main): Likewise.
	* gpg/t-trustlist.c (main): Likewise.
	* gpgsm/t-support.h: Include <stdlib.h> and <locale.h>.
	(init_gpgme): New function.
	* gpg/t-support.h: Likewise.
	* gpgsm/t-verify.c (main): Call init_gpgme.
	* gpgsm/t-decrypt.c (main): Likewise.
	* gpgsm/t-encrypt.c (main): Likewise.
	* gpgsm/t-export.c (main): Likewise.
	* gpgsm/t-genkey.c (main): Likewise.
	* gpgsm/t-import.c (main): Likewise.
	* gpgsm/t-keylist.c (main): Likewise.
	* gpgsm/t-sign.c (main): Likewise.
	* gpg/t-verify.c (main): Call init_gpgme.
	* gpg/t-decrypt-verify.c (main): Likewise.
	* gpg/t-decrypt.c (main): Likewise.
	* gpg/t-edit.c (main): Likewise.
	* gpg/t-encrypt-sign.c (main): Likewise.
	* gpg/t-encrypt-sym.c (main): Likewise.
	* gpg/t-encrypt.c (main): Likewise.
	* gpg/t-eventloop.c (main): Likewise.
	* gpg/t-export.c (main): Likewise.
	* gpg/t-genkey.c (main): Likewise.
2003-09-14 00:30:53 +00:00
Marcus Brinkmann
5231aa6a2a 2003-08-14 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-sign.c (check_result): Change output format for signature
	class to unsigned int.
	* gpg/t-signers.c (check_result): Likewise.
	* gpg/t-encrypt-sign.c (check_result): Likewise.
	* gpgsm/t-sign.c (check_result): Likewise.
2003-09-02 22:00:37 +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
51c384409e 2003-07-31 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-verify.c (check_result): Change type of SUMMARY to
	unsigned int.
	* gpg/t-decrypt-verify.c (check_verify_result): Likewise.
	* gpg/t-keylist-sig.c (keys): Change type of member CLASS to
	unsigned int.
	* t-data.c (read_cb): Change type of AMOUNT to unsigned int.
	* t-version.c (version): Remove unused variable.
2003-07-31 15:44:32 +00:00
Marcus Brinkmann
ade276f81e 2003-07-22 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (AM_CPPFLAGS): New variable.
	(LDADD): Add @GPG_ERROR_LIBS@.
	* gpg/Makefile.am (AM_CPPFLAGS): New variable.
	(LDADD): Add @GPG_ERROR_LIBS@.
	* gpgsm/Makefile.am (AM_CPPFLAGS): New variable.
	(LDADD): Add @GPG_ERROR_LIBS@.
2003-07-22 11:40:48 +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
92e9e8dd3a 2003-05-28 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-encrypt.c (main): Likewise.
	* gpgsm/t-export.c (main): Likewise.
2003-05-28 01:50:15 +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
64b0e7004f Fix last changes. 2003-05-27 08:31:33 +00:00
Marcus Brinkmann
0be6fec1e2 2003-05-27 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (TESTS): Order t-keylist and t-keylist-sig after
	t-import.
	* gpg/t-edit.c (edit_fnc): Work around gpg 1.2.2 bug by resetting
	primary uid after setting expiration date.
	* gpg/t-keylist.c: Change order of user IDs.
	* gpg/t-keylist-sig.c: Likewise.
	* gpg/t-import.c: Add support for gpg in CVS.
2003-05-27 05:07:19 +00:00
Marcus Brinkmann
0a1940070d 2003-05-27 Marcus Brinkmann <marcus@g10code.de>
* t-data.c: Remove TEST_OUT_CB.
	(main): Likewise.
	* gpg/t-trustlist.c (main): Access ITEM directly.
2003-05-27 03:06:37 +00:00
Marcus Brinkmann
c440b6792e Reintroduce a check in edit_fnc. 2003-05-27 01:39:18 +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
13634fff8a 2003-05-04 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-keylist-sig.c (main): Remove timestamp check.
2003-05-04 22:06:06 +00:00
Marcus Brinkmann
864371b340 2003-05-04 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-keylist.c: Add check for timestamp.
2003-05-04 17:00:52 +00:00
Marcus Brinkmann
c5097caeae 2003-05-04 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (TESTS): Add t-keylist-sig.
	* gpg/t-keylist-sig.c: New file.
2003-05-04 16:43: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
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
26ec59fdbd 2003-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-verify.c (main): Rewritten.
	* gpg/t-decrypt-verify.c: Rewritten.
	* gpgsm/t-verify.c (main): Rewritten.
2003-04-29 20:51:25 +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
16c4687a9c 2003-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-decrypt.c (main): Rewritten.
2003-04-28 21:28:22 +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
66e29b068e 2003-04-28 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-signers.c (print_data): Rewritten.
2003-04-28 20:23:20 +00:00
Marcus Brinkmann
e30568b240 2003-04-27 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-encrypt-sign.c (check_result): Rewritten.
2003-04-27 22:52:09 +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
88f6eaea9e 2003-04-27 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-import.c (check_result): Really use FPR.
	* gpgsm/t-import.c (check_result): Rewritten.
2003-04-27 18:25:07 +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
66be7f23a1 2003-04-25 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-genkey.c: Rewritten.
	* gpgsm/Makefile.am (noinst_PROGRAMS): Add t-genkey.
	* gpg/t-genkey.c: Include <stdlib.h>.
	(main): Check result->fpr before checking its length.
2003-04-25 12:38:55 +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
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
fdbee6b211 doc/
2003-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Engine Information): Rewritten.

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

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

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

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

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

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

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

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

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

	* gpgsm/t-verify.c (main): Adjust caller of gpgme_op_verify.
	* gpg/t-verify.c (main): Likewise.
	* gpg/t-decrypt-verify.c (main): Likewise for
	gpgme_op_decrypt_verify.
2002-12-24 13:08:56 +00:00
Marcus Brinkmann
c60bcb31ad 2002-12-23 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (./gpgsm.conf): Add a faked system time to
	avoid certification's expiry.
	* gpgsm/t-encrypt.c (main): Use the short certification name.
2002-12-23 21:06:38 +00:00
Marcus Brinkmann
dfc32a5441 doc/
2002-11-19  Marcus Brinkmann  <marcus@g10code.de>

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

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

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

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

	* gpg/t-genkey.c (main): Add missing argument to gpgme_op_genkey
	invocation.
CVSk: ----------------------------------------------------------------------
2002-11-19 16:41:17 +00:00
Marcus Brinkmann
0447e0dd6d gpgme/
2002-10-08  Marcus Brinkmann  <marcus@g10code.de>

	New data object component:

	* gpgme.h (GpgmeDataReadCb, GpgmeDataWriteCb, GpgmeDataSeekCb,
	GpgmeDataReleaseCb): New types.
	(struct GpgmeDataCbs): New structure.
	(gpgme_data_read): Changed prototype to match that of read() closely.
	(gpgme_data_write): Similar for write().
	(gpgme_data_seek, gpgme_data_new_from_cbs, gpgme_data_new_from_fd,
	gpgme_data_new_from_stream): New prototypes.
	(gpgme_data_get_type, gpgme_check_engine): Prototype removed.

	* Makefile.am (libgpgme_la_SOURCES): Add data.h, data-fd.c,
	data-stream.c, data-mem.c, data-user.c and data-compat.c.
	* data.c: Reimplemented from scratch.
	* (data-compat.c, data-fd.c, data.h, data-mem.c, data-stream.c,
	data-user.c): New file.
	* context.h (struct gpgme_data_s): Removed.
	* conversion.c: Include <errno.h> and <sys/types.h>.
	(_gpgme_data_append): New function.
	* data.c (_gpgme_data_append_string): Move to ...
	* conversion.c (_gpgme_data_append_string): ... here.
	* data.c (_gpgme_data_append_for_xml): Move to ...
	* conversion.c (_gpgme_data_append_for_xml): ... here.
	* data.c (_gpgme_data_append_string_for_xml): Move to ...
	* conversion.c (_gpgme_data_append_string_for_xml): ... here.
	* data.c (_gpgme_data_append_percentstring_for_xml): Move to ...
	* conversion.c (_gpgme_data_append_percentstring_for_xml): ... here.

	* ops.h (_gpgme_data_get_mode, _gpgme_data_set_mode): Prototype
	removed.
	* types.h (GpgmeDataMode): Type removed.

	* decrypt.c (_gpgme_decrypt_start): Don't check data type or mode.
	* edit.c (_gpgme_op_edit_start): Likewise.
	* encrypt.c (_gpgme_op_encrypt_start): Likewise.
	* encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
	* encrypt-sign.c (_gpgme_op_encrypt_sign_start): Likewise.
	* export.c (_gpgme_op_export_start): Likewise.
	* genkey.c (_gpgme_op_genkey_start): Likewise.
	* import.c (_gpgme_op_import_start): Likewise.
	* sign.c (_gpgme_op_sign_start): Likewise.
	* verify.c (_gpgme_op_verify_start): Likewise.

	* encrypt.c (gpgme_op_encrypt): Remove hack that returns invalid
	no recipient if no data was returned.
	* encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
	no recipient if no data was returned.
	* encrypt-sign.c (gpgme_op_encrypt_sign): Remove hack that returns
	no recipient if no data was returned.

	* engine.c (_gpgme_engine_op_verify): Add new argument to
	differentiate detached from normal signatures.
	* engine.h (_gpgme_engine_op_verify): Likewise for prototype.
	* engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise.  Don't check
	mode of data argument.
	* engine-gpgsm.h (_gpgme_gpgsm_op_verify): Likewise for prototype.
	* gpgme.h (gpgme_op_verify_start): Likewise for prototype.
	(gpgme_op_verify): Likewise for prototype.
	* rungpg.c (_gpgme_gpg_op_verify): Likewise.
	* rungpg.h (_gpgme_gpg_op_verify): Likewise for prototype.
	* verify.c (_gpgme_op_verify_start): Likewise.
	(gpgme_op_verify_start): Likewise.
	(gpgme_op_verify): Likewise.

	* rungpg.c (struct arg_and_data_s): New member INBOUND to hold
	direction of data object.
	(_gpgme_gpg_add_data): Add new argument INBOUND.  Use it to
	determine direction of data object.
	(_gpgme_gpg_add_pm_data, _gpgme_gpg_set_command_handler,
	_gpgme_gpg_op_decrypt, _gpgme_gpg_op_edit, _gpgme_gpg_op_encrypt,
	_gpgme_gpg_op_encrypt_sign, _gpgme_gpg_op_export,
	_gpgme_gpg_op_genkey, _gpgme_gpg_op_import, _gpgme_gpg_op_sign,
	_gpgme_gpg_op_verify): Add new argument to _gpgme_gpg_add_data
	invocation.
	(build_argv): Use new member INBOUND to determine direction of
	file descriptor.  Don't check the data type.
	* rungpg.h (_gpgme_gpg_add_data): Add new argument to prototype.

	* gpgme.c (gpgme_get_op_info): Don't call
	_gpgme_data_get_as_string if CTX->op_info is NULL.

	* version.c (gpgme_check_engine): Function removed.


tests/
2002-10-09  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-decrypt.c (print_data): Update to new gpgme_data_read
	interface, and use gpgme_engine_check_version instead
	gpgme_check_version.
	* gpg/t-decrypt-verify.c (print_data): Likewise.
	* gpg/t-edit.c (main): Likewise.
	* gpg/t-encrypt.c (print_data): Likewise.
	* gpg/t-encrypt-sign.c (print_data): Likewise.
	* gpg/t-encrypt-sym.c (print_data): Likewise.
	* gpg/t-eventloop.c (print_data): Likewise.
	* gpg/t-export.c (print_data): Likewise.
	* gpg/t-sign.c (print_data): Likewise.
	* gpg/t-signers.c (print_data): Likewise.
	* gpgsm/t-decrypt.c (print_data): Likewise.
	* gpgsm/t-encrypt.c (print_data): Likewise.
	* gpgsm/t-export.c (print_data): Likewise.
	* gpgsm/t-sign.c (print_data): Likewise.
	* gpg/t-verify.c (main): Likewise for gpgme_op_verify.
	* gpgsm/t-verify.c (main): Likewise for gpgme_op_verify.
	* t-data.c (read_once_test): Likewise.
	(write_test): Update for new behaviour of data objects.
	(main): Remove type test.
2002-10-09 00:16:38 +00:00
Werner Koch
d256945205 * gpgsm/t-keylist.c (doit): Add arg SECRET.
(main): Add option --secret.
2002-09-30 08:03:56 +00:00
Marcus Brinkmann
e9f9833e05 2002-09-28 Marcus Brinkmann <marcus@g10code.de>
* t-version.c: Include <string.h>.  Reported by St�phane Corth�sy.
2002-09-28 20:09:12 +00:00
Marcus Brinkmann
05c75f41a5 2002-09-02 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-keylist.c (main): Test PATTERN for NULL before printing.
	Reported by Dr. Stefan Dalibor <Dr.Stefan.Dalibor@bfa.de>.
2002-09-02 13:01:29 +00:00
Marcus Brinkmann
9285922de0 2002-08-01 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-edit.c: Also add a test for the expire command (testing
	the passphrase callback).
2002-08-01 16:02:19 +00:00
Marcus Brinkmann
6539293063 2002-07-28 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-edit.c: New file.
	* gpg/Makefile (TESTS): Add t-edit.
2002-07-28 18:43:48 +00:00
Marcus Brinkmann
8270052e0f 2002-07-25 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-encrypt-sym.c (main): Change type of I to size_t and
	rename to LEN.
	* gpg/t-verify.c (main): Likewise.  Submitted by St�phane
	Corth�sy.
2002-07-25 18:15:11 +00:00
Marcus Brinkmann
d7b78c0987 2002-07-03 Marcus Brinkmann <marcus@g10code.de>
* gpg/t-eventloop.c: New file.
	* gpg/Makefile (TESTS): Add t-eventloop.
2002-07-03 02:18:43 +00:00
Werner Koch
06cd423a8b * gpgsm/t-import.c (print_op_info): New.
(main): Print operation info.

* engine-gpgsm.c (map_assuan_error): Map No_Data_Available to EOF.

* import.c (append_xml_impinfo): Kludge to print fingerprint
instead of keyid for use with gpgsm.
(import_status_handler): Set a flag to know whether any import
occured.
(gpgme_op_import): Reurn -1 if no certificate ewas imported.

* gpgme.texi (Importing Keys): Document the return value -1 of
gpgme_op_import.
2002-06-26 12:49:59 +00:00
Werner Koch
692d0e43f4 * gpgsm/Makefile.am (DISTCLEANFILES): new. 2002-06-25 19:04:40 +00:00
Marcus Brinkmann
7a32c607e3 2002-06-25 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (TESTS): Add t-export.
	gpgsm/t-export.c: New file.
2002-06-25 12:12:25 +00:00
Werner Koch
e6dc9fd6c4 * gpgsm/t-sign.c (main): Also test a normal signature.
* gpg/Makefile (TESTS_ENVIRONMENT): Set GPG_AGENT_INFO empty.
* gpg/t-signers.c, gpg/t-sign.c, gpg/t-encrypt-sym.c
* gpg/t-encrypt-sign.c, gpg/t-decrypt.c
* gpg/t-decrypt-verify.c (main): Changed the GPG_AGENT_INFO check to
match the one in ../../gpgme/rungpg.c.
2002-06-20 13:47:24 +00:00
Werner Koch
61c97e9fa9 tests/
* gpgsm/t-keylist.c (doit): Print operation info if available.
gpgme/
* keylist.c (struct keylist_result_s): New.
(_gpgme_release_keylist_result): Release it here
(keylist_status_handler): Handle truncated.
(append_xml_keylistinfo): New.
* gpgme.c (_gpgme_release_result): and use it here.
* types.h: Declare the new type here.
* context.h (struct gpgme_context_s): Use it here.
2002-06-12 14:34:15 +00:00
Werner Koch
6b89172051 * gpgme.h: Add GPGME_ATTR_SIG_SUMMARY and the GPGME_SIGSUM_
constants.
* verify.c (calc_sig_summary): New.
(gpgme_get_sig_ulong_attr): And use it here.
2002-06-11 15:33:08 +00:00
Werner Koch
9a3eae2c5e * gpgsm/t-encrypt.c (main): Add a simple option parser and allow
to specify an encryption key.
2002-06-04 14:01:11 +00:00
Marcus Brinkmann
ac8f6d2c8a 2002-05-26 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (all-local): Remove dependency on ./secring.gpg.
	(./secring.gpg): Remove target, and move all rules for this target
	to ...
	(./pubring.gpg): ... here.  This was necessary because GnuPG 1.0.7
	does create an empty secring.gpg file when importing public keys.
2002-05-26 19:51:53 +00:00
Marcus Brinkmann
39a679ed75 2002-05-08 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-verify.c (validity_string): New.
	(print_sig_stat): Print expire time and validity.
	(status_string): Add new exipred stati.
2002-05-08 03:06:16 +00:00
Werner Koch
fb23b0382d * gpg/t-verify.c (validity_string): New.
(print_sig_stat): Print expire time and validity.
(status_string): Add new exipred stati.
2002-05-03 14:07:22 +00:00
Marcus Brinkmann
d30f21c528 2002-04-05 Marcus Brinkmann <marcus@g10code,de>
* gpgsm/Makefile.am (./trustlist.txt): Put more into this file to
	prevent use of gpg-agent.
	(./gpg-agent.conf): Remove target.
	(all-local): Remove ./gpg-agent.conf.
2002-04-04 23:01:31 +00:00
Marcus Brinkmann
9f4af70d4b 2002-04-05 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-keylist.c (main): Use gpgme_engine_check_version instead
	gpgme_check_engine.
	* gpgsm/t-encrypt.c (main): Likewise.
2002-04-04 22:22:56 +00:00
Werner Koch
cb95583ffe removed all the .cvsignre files - they should be local 2002-03-10 18:41:02 +00:00
Marcus Brinkmann
748aa18dc6 doc/
2002-03-06  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Encrypting a Plaintext): Document symmetric
	encryption.

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

	* encrypt.c (_gpgme_encrypt_sym_status_handler): New function.
	(gpgme_op_encrypt_start): New variable SYMMETRIC, set it if RECP
	is null, and if it is set, use _gpgme_encrypt_sym_status_handler
	as status handler and run _gpgme_passphrase_start.
	* rungpg.c (_gpgme_gpg_op_encrypt): If RECP is zero, do symmetric
	encryption.
	* engine-gpgsm.c (_gpgme_gpgsm_op_encrypt): If RECP is zero,
	return error value.

	* rungpg.c (_gpgme_gpg_op_verify): Add "--" argument.

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

	* gpg/t-encrypt-sym.c: New file.
	* gpg/Makefile.am (TESTS): Add t-encrypt-sym.
2002-03-06 01:40:25 +00:00
Marcus Brinkmann
b0bfb987af 2002-03-05 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (CLEANFILES): Remove random_seed, which is now
	in DISTCLEANFILES.
2002-03-05 20:22:06 +00:00
Werner Koch
bcd5749348 * gpg/Makefile.am (DISTCLEANFILES): Added.
* configure.ac: Bumbed LT version numbers to (7,1,0), requires
gpgsm 0.3.1.
2002-03-04 11:16:11 +00:00
Marcus Brinkmann
7d0eebf41a doc/
2002-03-03  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Verify): Document verification of normal and
	cleartext signatures.

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

	* rungpg.c (_gpgme_gpg_op_verify): If TEXT is of mode
	GPGME_DATA_MODE_IN, construct a command line that stores the
	plaintext in TEXT.
	* verify.c (gpgme_op_verify_start): Accept TEXT being
	uninitialized, and in this case interpret SIG as a normal or
	cleartext signature and TEXT as a return data object.
	* engine-gpgsm.c (_gpgme_gpgsm_op_verify): Likewise.

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

	* gpg/t-verify.c (main): Add a few more sanity checks, and a check
	for normal signatures.
2002-03-03 16:46:33 +00:00
Marcus Brinkmann
c22974f99f doc/
2002-02-26  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Encrypting a Plaintext): Document
	gpgme_op_encrypt_sign and gpgme_op_encrypt_sign_start.

gpgme/
2002-02-25  Marcus Brinkmann  <marcus@g10code.de>

	* engine.c (_gpgme_engine_op_encrypt_sign): New function.
	* engine.h (_gpgme_engine_op_encrypt_sign): New prototype.
	* rungpg.c (_gpgme_append_gpg_args_from_signers): New function.
	(_gpgme_gpg_op_sign): Use that new function.
	(_gpgme_gpg_op_encrypt_sign): New function.
	* rungpg.h (_gpgme_gpg_op_encrypt_sign): New prototype.
	* gpgme.h (gpgme_op_encrypt_sign_start): New prototype.
	(gpgme_op_encrypt_sign): Likewise.
	* Makefile.am (libgpgme_la_SOURCES): Add encrypt-sign.c.
	* ops.h (_gpgme_encrypt_status_handler): Add prototype.
	(_gpgme_sign_status_handler): Add prototype.
	* sign.c (sign_status_handler): Rename to ...
	(_gpgme_sign_status_handler): ... this and make non-static.
	* encrypt.c (encrypt_status_handler): Rename to ...
	(_gpgme_encrypt_status_handler): ... this and make non-static.
	* encrypt.c (gpgme_op_encrypt_start): Use new status handler name.
	* sign.c (gpgme_op_sign_start): Likewise.

tests/
2002-02-26  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-encrypt-sign.c: New file.
	* gpg/Makefile.am (TESTS): Add t-encrypt-sign.
2002-02-26 00:08:09 +00:00
Werner Koch
accc40c84a * gpgsm/Makefile.am (private-keys-v1.d): Don't
fail when the directory already exists.
2002-02-13 15:02:09 +00:00
Marcus Brinkmann
10750fcfd9 2002-02-12 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AC_INIT): Bump version to 0.3.3.
	* jnlib/Makefile.am: Rever to older version that includes xmalloc
	but not dotlock and some other files.  Reported by St�phane
	Corth�sy.

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

	* gpg/Makefile.am (CLEANFILES): New target.
	(distclean-local): Rename to ...
	(clean-local): ... this.
2002-02-12 22:08:10 +00:00
Marcus Brinkmann
b7ac6614dd 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (./private-keys-v1.d/$(key_id).key): Fix rule.
2002-02-09 00:58:42 +00:00
Marcus Brinkmann
4286ebe122 2002-02-09 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-genkey.c: New file (not added to Makefile.am because of
	gpg-agent bug).
2002-02-09 00:07:59 +00:00
Marcus Brinkmann
6f2245b35d 2002-02-08 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (key_id): Update value.
	(all-local): Add .key to keyid filename.
	(./private-keys-v1.d/$(key_id)): Renamed to ...
	(./private-keys-v1.d/$(key_id).key): ... this.
	(all-local): Add ./gpgsm.conf, ./trustlist.txt.
	(./gpgsm.conf, ./trustlist.txt): New target.
	* gpgsm/567064FE6D14A17B2D811ABB407728BC558AA455: Renamed to ...
	* gpgsm/32100C27173EF6E9C4E9A25D3D69F86D37A4F939: ... this.
2002-02-08 22:36:57 +00:00
Marcus Brinkmann
088c044792 doc/
2002-01-30  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Importing Keys): Add reference to gpgme_get_op_info.

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

	* import.c (struct import_result_s): New structure.
	(_gpgme_release_import_result): New function.
	(append_xml_impinfo): Likewise.
	(import_status_handler): Implement.
	* gpgme.c (_gpgme_release_result): Add call to
	_gpgme_release_import_result.
	* ops.h (_gpgme_release_impoer_result): Add prototype.
	* types.h (ImportResult): New type.
	* context.h (gpgme_context_s): Add ImportResult to member result.

	* encrypt.c (gpgme_op_encrypt): Code clean up.

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

	* gpg/t-import.c (print_op_info): New function.
	(main): Use it.
2002-01-30 21:52:32 +00:00
Marcus Brinkmann
1e1fb4724c doc/
2002-01-22  Marcus Brinkmann  <marcus@g10code.de>

	* gpgme.texi (Passphrase callback): Change GpgmePassphraseCb's
	R_HD type from void* to void**.

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

	* gpgme.h (GpgmePassphraseCb): Change type of R_HD from void* to
	void**.

tests/
2002-01-22  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-signers.c (passphrase_cb): Change type of r_hd to void**.
	* gpg/t-sign.c (passphrase_cb): Likewise.
	* gpg/t-decrypt-verify.c (passphrase_cb): Likewise.
	* gpg/t-decrypt.c (passphrase_cb): Likewise.
2002-01-22 15:32:44 +00:00
Marcus Brinkmann
a087259977 gpgme/
2001-12-19  Marcus Brinkmann  <marcus@g10code.de>

	* engine.c: Include `string.h'.  Reported by St�phane Corth�sy.

	* version.c (get_engine_info): Remove prototype.

tests/
2001-12-19  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/t-decrypt-verify.c: Don't include `mcheck.h'.  Reported by
	St�phane Corth�sy.
2001-12-19 17:46:02 +00:00
Marcus Brinkmann
530bad57ce Revert cruft from last check in. 2001-12-19 17:26:54 +00:00
Werner Koch
8ec53dc804 Learn more about the trash I have on my machine. 2001-12-19 13:00:10 +00:00
Werner Koch
a3fcd4e06c updated .cvsignore files 2001-12-19 12:44:02 +00:00
Marcus Brinkmann
abd820c4a9 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
* gpg/Makefile.am (EXTRA_DIST): Add missing line continuation.
2001-12-19 00:47:42 +00:00
Marcus Brinkmann
2ad0959598 2001-12-19 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile.am (EXTRA_DIST): Add $(key_id).
2001-12-18 23:46:50 +00:00
Marcus Brinkmann
2a866e025c 2001-12-16 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/Makefile: Rename `pubcerts.kbx' to `pubring.kbx'.
2001-12-16 18:38:03 +00:00
Marcus Brinkmann
5e667d3c1d 2001-12-15 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-keylist.c (check_two_contexts): Set protocols.
2001-12-15 14:13:18 +00:00
Marcus Brinkmann
017c62f464 Small code cleanup. 2001-12-14 22:03:11 +00:00
Marcus Brinkmann
35e79617a7 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-sign.c: New file.
	* gpgsm/Makefile.am (TESTS): Add t-sign.
2001-12-14 20:23:18 +00:00
Marcus Brinkmann
27b771dbd6 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-decrypt.c: New file.
	* gpgsm/567064FE6D14A17B2D811ABB407728BC558AA455: Likewise.
	* gpgsm/Makefile.am (TESTS): Add t-decrypt.
	(key_id): New variable.
	(all-local): New target ./private-keys-v1.d/$(key_id) added.
	(./private-keys-v1.d/$(key_id)): New target.
2001-12-14 19:29:44 +00:00
Marcus Brinkmann
9a9eb1dcec 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/t-verify.c: New file.
	* gpgsm/Makefile.am (TESTS): Add t-verify.
2001-12-14 16:08:54 +00:00
Marcus Brinkmann
a54c0a05b5 2001-12-14 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (GPG): Substitute this variable.
	(GPGSM): Likewise.

tests/
CVS2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* gpg/Makefile.am (GPG): Set to @GPG_PATH@.
	(./pubring.gpg): Use $(GPG) instead gpg.
	(./secring.gpg): Likewise.

	* gpgsm/t-import.c (main): Remove third test case.
	* gpgsm/Makefile.am (GPGSM): Set to @GPGSM@.
	(all-local): New target.
	(./pubcerts.kbx): Likewise.
	* gpgsm/t-encrypt.c: New file.
	* gpgsm/Makefile.am (TESTS): Add t-encrypt.
2001-12-14 15:35:29 +00:00
Marcus Brinkmann
0913218bcc gpgme/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* engine-gpgsm.c (struct gpgsm_object_s): New member colon.attic.
	(_gpgme_gpgsm_new): Initialize some more members.
	(_gpgme_gpgsm_release): Free the colon line handler's attic line.
	(gpgsm_status_handler): Rework the inline-data processing.

tests/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* gpgsm/t-keylist.c: New file.
	* gpgsm/Makefile.am (TESTS): Add t-keylist.
2001-12-14 00:49:38 +00:00
Marcus Brinkmann
0c05b3d8bd Revert last change. 2001-12-14 00:29:29 +00:00
Marcus Brinkmann
831692ebf7 2001-12-13 Marcus Brinkmann <marcus@g10code.de>
* gpgsm/cert_dfn_pca01.der: New file.
	* gpgsm/cert_dfn_pca15.der: Likewise.
	* gpgsm/cert_g10code_test1.der: Likewise.
	* gpgsm/t-import.c: Likewise.
	* gpgsm/Makefile.am (EXTRADIST): Add new files.
	(TESTS): Add t-import.
2001-12-13 21:51:30 +00:00
Werner Koch
9f84291722 .cvsigore updated - I still not tyhing they should go innto the cvs 2001-12-13 15:07:59 +00:00
Werner Koch
4922297af1 Set protocol to CMS to test gpgsm 2001-12-13 15:06:56 +00:00
Marcus Brinkmann
ba1e19e10b Add .cvsignore files. Suggested by Jan-Oliver Wagner <jan@intevation.de>. 2001-12-05 19:50:45 +00:00
Marcus Brinkmann
790a8e192f 2001-11-22 Marcus Brinkmann <marcus@g10code.de>
* gpg/: New directory.
	* Makefile.am, t-verify.c, t-encrypt.c, t-signers.c, t-trustlist.c,
	t-sign.c, t-keylist.c, t-import.c, t-genkey.c, t-export.c,
	t-decrypt-verify.c, t-decrypt.c, t-version.c, t-data.c, mkdemodirs.
	cipher-1.asc, cipher-2.asc, geheim.txt, pubdemo.asc, pubkey-1.asc,
	secdemo.asc, seckey-1.asc): Move to sub directory gpg/.

	* gpg/Makefile.am (INCLUDES): Include gpgme/, not include/ and
	intl/.
	(LDD): Correct relative path to gpgme library.
	(TESTS): Remove t-version and t-data.
	* gpg/t-verify.c, gpg/t-encrypt.c, gpg/t-signers.c, gpg/t-trustlist.c,
	gpg/t-sign.c, gpg/t-keylist.c, gpg/t-import.c, gpg/t-genkey.c,
	gpg/t-export.c, gpg/t-decrypt-verify.c, gpg/t-decrypt.c,
	t-version.c, t-data.c): Include gpgme.h, not "../gpgme/gpgme.h".

	* Makefile.am: New file.
	* gpgsm/: New directory.
	* gpgsm/Makefile.am: New file.
2001-11-22 03:01:26 +00:00
Marcus Brinkmann
d65c4b72d9 gpgme/
2001-11-16  Marcus Brinkmann  <marcus@g10code.de>

	* decrypt-verify.c: New file.
	* Makefile.am (libgpgme_la_SOURCES): Add decrypt-verify.c.
	* types.h: Add decrypt-verify types.
	* ops.h: Likewise.
	* context.h: Add result type for decrypt-verify.
	* gpgme.h: Add decrypt-verify prototypes.

	* decrypt.c (decrypt_status_handler): Renamed to ...
	(_gpgme_decrypt_status_handler): ... this.  Make non-static.
	(_gpgme_decrypt_start): New function, derived from
	gpgme_op_decrypt_start.
	(gpgme_op_decrypt_start): Reimplement in terms of
	_gpgme_decrypt_start.
	(_gpgme_decrypt_result): New function to retrieve error value.
	(gpgme_op_decrypt): Use _gpgme_decrypt_result.
	* ops.h: Add prototypes for new functions.

	* verify.c (verify_status_handler): Renamed to ...
	(_gpgme_verify_status_handler): ... this.  Make non-static.
	(gpgme_op_verify_start): Use new function name.
	(intersect_stati): Renamed to ...
	(_gpgme_intersect_stati): ... this.  Make non-static.
	(gpgme_op_verify): Use new name.
	* ops.h: Add prototypes for new functions.

tests/
2001-11-16  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (TESTS): Add t-decrypt-verify.
	* t-decrypt-verify.c: New file.
	* cipher-2.asc: Likewise.
2001-11-16 01:37:06 +00:00
Marcus Brinkmann
1ecdde3ced gpgme/
2001-11-02  Marcus Brinkmann  <marcus@g10code.de>

	* rungpg.c (pipemode_copy): Change type of NBYTES to size_t.

	* key.c: Include string.h.
	* data.c: Likewise.
	* recipient.c: Likewise.

tests/
2001-11-02  Marcus Brinkmann  <marcus@g10code.de>

	* t-data.c: Include stddef.h.
	(read_once_test): Change type of READ to size_t.
	(read_test): Likewise.
	(write_test): Likewise.
2001-11-02 15:51:15 +00:00
Marcus Brinkmann
c3e7053489 gpgme/
2001-10-29  Marcus Brinkmann  <marcus@g10code.de>

	* context.h: New member signers_len.  * signers.c
	(gpgme_signers_clear): Require that signers are non-NULL with
	assertion.  Use signers_len to determine how much keys to release.
	Add documentation.
	(gpgme_signers_add): Use signers_len to determine if the buffer is
	large enough.  Use xtryrealloc rather than xtrymalloc and copying.
	Add documentation.
	(gpgme_signers_enum): Use signers_len to determine if key is
	available.  Add documentation.

tests/
2001-10-29  Marcus Brinkmann  <marcus@g10code.de>

	* t-signers.c: New file.
	* Makefile.am (TESTS): Add t-signers.
2001-10-29 00:08:14 +00:00
Werner Koch
8b12f7c763 Merged with old ChnageLog which accidently was not in the CVS 2001-10-23 10:56:07 +00:00
Marcus Brinkmann
cb90fee79d 2001-10-22 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (TEST_ENVIRONMENT): Revert last change.
2001-10-22 17:31:21 +00:00
Marcus Brinkmann
4691a5e940 2001-10-22 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (TEST_ENVIRONMENT): Set environment to $(srcdir),
	not current directory.
2001-10-22 15:39:22 +00:00
Marcus Brinkmann
d4fb115bda 2001-10-22 Marcus Brinkmann <marcus@g10code.de>
* t-data.c (write_test): New function.
	(main): Invoke write_test for all rounds except TEST_OUT_CB.
2001-10-22 14:19:25 +00:00
Marcus Brinkmann
901bb49285 2001-10-22 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (INCLUDES): Remove spurious duplicate to silence
	automake.
2001-10-22 12:50:36 +00:00
Marcus Brinkmann
f83651e0a5 2001-10-16 Marcus Brinkmann <marcus@g10code.de>
* t-version.c: New file.
	* t-data.c: Likewise.
	* t-data-1.txt: Likewise.
	* t-data-2.txt: Likewise.
	* Makefile.am (TESTS): Add t-version, t-data.
2001-10-17 19:17:46 +00:00
Werner Koch
9e7db481a6 New API to switch to S/MIME. There is no code yet behind it. 2001-10-15 12:19:14 +00:00
Werner Koch
b4eddd3042 Fixed a keylisting bug 2001-09-17 10:36:05 +00:00
Werner Koch
5b3d8162b4 Some changes 2001-09-03 18:41:53 +00:00
Werner Koch
6c7ce7551d Typo fixes and new gpgme_get_op_info 2001-08-28 11:11:10 +00:00
Werner Koch
4c76d6dce1 Changes by Jose and Tommy. 2001-05-28 17:35:10 +00:00
Werner Koch
bf6779bf74 Release 0.2.1 2001-04-02 08:40:32 +00:00
Werner Koch
5b561c2f11 Give access to key capabilities 2001-03-15 13:09:41 +00:00
Werner Koch
7bd07d62f3 FD are now released and a major bug has been fixed.
The W32 version does not compile at the meoment.
2001-02-19 17:22:38 +00:00
Werner Koch
04e0ea083a W32 fixes 2001-02-14 19:42:49 +00:00
Werner Koch
962bb6af10 reap off gpg processes 2001-02-13 15:00:31 +00:00
Werner Koch
06dae7fcf3 Multiple signatures can now be verified. 2001-02-12 15:23:29 +00:00
Werner Koch
2e693f612d Add missing demo keys 2001-01-30 11:10:22 +00:00
Werner Koch
e318473836 Add better debug printing. Use reader threads for W32 2001-01-30 11:01:41 +00:00
Werner Koch
f2be414251 Some new but untested functions 2001-01-22 20:22:41 +00:00
Werner Koch
96f67a5fdc Release 0.1.4 2001-01-11 11:56:34 +00:00
Werner Koch
d6cd1f97ca More changes and and some new functions 2001-01-08 20:40:25 +00:00
Werner Koch
c74adbc096 Add 2 missing files and other changes 2000-12-29 10:34:34 +00:00
Werner Koch
6b4ca13dd4 Add progress CB and subkey listing 2000-12-19 10:07:32 +00:00
Werner Koch
a92ecd4470 Add key generation 2000-12-18 20:54:43 +00:00
Werner Koch
715cf2aed3 Add key import and export facility 2000-12-14 14:45:35 +00:00
Werner Koch
edcc338a59 Add a passphrase callback and minor changes to the interface 2000-12-12 13:31:25 +00:00
Werner Koch
874f12ea70 Okay, it runs at least on Windows 95 2000-12-06 12:17:10 +00:00
Werner Koch
f9a167c516 Does some basic tasks. 2000-11-20 20:17:36 +00:00
Werner Koch
fabce92fe3 configuration changes 2000-11-17 21:20:53 +00:00
Werner Koch
08eaf1cea1 Released 0.0.0 2000-11-16 17:26:53 +00:00
Werner Koch
3868237d95 Added sign functionality 2000-11-16 14:53:52 +00:00
Werner Koch
7f8c3532e7 Added decryption 2000-11-16 13:15:48 +00:00
Werner Koch
529b82f638 Notation stuff added 2000-11-15 21:36:48 +00:00
Werner Koch
e047a8a263 Reanmed public functions 2000-11-13 13:25:22 +00:00
Werner Koch
f14941f072 keylist does now return objects. 2000-11-10 20:56:02 +00:00
Werner Koch
cbb513962a Started with --list-key 2000-11-10 17:50:24 +00:00
Werner Koch
36966ea498 Add verify function 2000-11-09 16:35:35 +00:00
Werner Koch
b9bf49968b Just a backup for now 2000-11-07 13:32:38 +00:00