2009-08-08  Moritz  <moritz@gnu.org>

	* poldi-ctrl.c (main): Pass NULL as scd_connect's new scd_options
	parameter.

2008-08-07  Moritz  <moritz@gnu.org>

	* poldi-ctrl.c (cmd_dump): Removed (disabled) workaround for older
	cards for now.

2008-08-04  Moritz  <moritz@gnu.org>

	* poldi-ctrl.c: Mark strings for i18n.

2008-08-03  Moritz  <moritz@gnu.org>

	* poldi-ctrl.c (i18n_cb): New function.
	(main): call simpleparse_set_i18n_cb.

2008-07-20  Moritz  <moritz@gnu.org>

	* Makefile.am: removed jnlib.

	* poldi-ctrl.c: New static variables: loghandle, scd_ctx,
	scd_cardinfo. Setup loghandle and scdaemon context in main(), thus
	the cmd implementation functions don't need to it anymore.
	Now uses simplelog API.

2008-07-14  Moritz  <moritz@gnu.org>

	* poldi-ctrl.c: Don't include pwd.h and util/optparse.h.  Include:
	util/simpleparse.h.
	(struct poldi_ctrl_opt): Remove member cmd_print_config.  Replace
	enum_arg_opt_ids list with enum opt_ids.  Replace ARGPARSE_OPTS
	definitions with simpleparse_opt_spec_t opt_specs[].
	(my_strusage): Dropped functions.
	(poldi_ctrl_options_cb): Adjust to new simpleparse interface.
	Throughout: adjust calls to scd_connect() to new API (providing
	logging callback).
	(cmd_print_config): Dropped function. I don't think this
	functionality is required. Instead do: cat poldi.conf.
	(main): use new simpleparse subsystem, not jnlibs ARGPARSE, do not
	use jnlib logging interface.
	
2008-04-05  Moritz  <moritz@gnu.org>

	* poldi-ctrl.c (cmd_dump): Use bin2hex instead of convert_to_hex.
	Removed usersdb manipulating functions.

2007-11-10  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c (conversation): Removed unused function.

2007-11-04  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c (main): Adjust to new options_parse_argv API.

2007-10-28  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c: Do not include scd-support.h; include
	common/support.h.
	* Makefile.am (poldi_ctrl_LDADD): Removed reference to
	libscd-support.a

2007-10-27  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c: Removed "test" command completely.  It's rationale
	was to test authentication through Poldi.  But since poldi-ctrl
	didn't use the PAM module (instead it duplicated some
	authentication code), it's not suitable for testing Poldi through
	*PAM*.  Removing this command simplifies the Poldi package. There
	are more reliable ways of testing authentication through Poldi:
	e.g. the "pamtester" program (not included in PAM Poldi), which
	uses the PAM API.

2007-08-25  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c (my_strusage): Handle copyright line.
	Implemented new CLI argument: --serialno-inserted.
	(struct poldi_ctrl_opt): New member: serialno_inserted.
	(enum arg_opt_ids): New: arg_serialno_inserted.
	(ARGPARSE_OPTS arg_opts): Specify arg_serialno_inserted.
	(poldi_ctrl_options_cb): Handle arg_serialno_inserted.
	(serialno_from_inserted_card): New function.
	(cmd_register_card): New variable: use_inserted; use
	serialno_from_inserted_card.
	(cmd_unregister_card): New variables: serialno, use_inserted; use
	serialno_from_inserted_card.
	(cmd_associate):  New variables: serialno,  account, use_inserted;
	use serialno_from_inserted_card().
	(cmd_disassociate): Likewise.  Allow disassociate if serialno AND
	account is given (removed wildcard mechanism with one of these two
	being NULL).

2007-08-17  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_test): Call wait_for_card().
	(cmd_dump): Unused variable key_nbits; do not pretend to dump key
	sizes; cleanup.

2007-08-16  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_test): Lookup GPG_AGENT_INFO, not
	SCDAEMON_INFO.
	(cmd_dump): Likewise.
	(cmd_set_key): Likewise.

2007-08-10  Moritz  <moritz@euler>

	* poldi-ctrl.c (cmd_test): Call scd_reset.
	(cmd_dump): Likewise.
	(cmd_set_key): Likewise.

2007-06-29  Moritz  <moritz@g10code.com>

	* poldi-ctrl.c: Removed includes: <common/card.h>, <libscd/scd.h>,
	<common/options.h>; new includes: <common/optparse.h>,
	<scd/scd.h>, <scd-support/scd-support.h>.
	(struct poldi_ctrl_opt): Removed members: debug_sc, ctapi_driver,
	pcsc_driver, reader_port, disable_opensc, disable_ccid,
	debug_ccid_driver.
	(enum arg_opt_ids): Removed: arg_ctapi_driver, arg_pcsc_driver,
	arg_reader_port, arg_disable_ccid, arg_disable_opensc,
	arg_debug_ccid_driver, arg_require_card_switch.
	(arg_opts[]): Adjusted to arg_opt_ids changes.
	(poldi_ctrl_options_cb): Likewise.
	(cardinfo_NULL): New variable.
	(cmd_test, cmd_dump, cmd_set_key): Slightly rewritte, use new scd
	interface.
	(main): Initialize libgcrypt secure memory, removed call to
	scd_init.

	* Makefile.am: Adjusted CFLAGS/LDADD, include cmacros.am.
	(poldi_ctrl_LDADD): Removed $(GPG_ERR_LDFLAGS),$(LIBUSB_LIBS);
	added: $(LIBASSUAN_LIBS).

2005-12-11  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c: Removed some FIXMEs.

2005-12-10  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (ask_user): Return ERR_NO_DATA in case of EOF while
	reading username, return ERR_INV_NAME in case an empty line was
	read.
	(key_file_create): Print warning instead of error message in case
	the key file does already exist; only change file owner in case
	PWENT is non-NULL.
	(main): Include new commands, removed old commands.

	(key_file_create): Open key file with O_EXCL flag set, better
	error handling.

	(struct poldi_ctrl_opt): New members: cmd_register_card,
	cmd_unregister_card, cmd_list_cards, cmd_associate,
	cmd_disassociate; removed members: cmd_add_user, cmd_remove_user.
	Implemented new commands.

	(cmd_register_card, cmd_unregister_card, cmd_list_cards,
	cmd_associate, cmd_disassociate, directory_process_cb): New
	functions.
	(cmd_add_user, cmd_remove_user): Removed functions.
	(enum arg_opt_ids): Add new symbols for new command arguments.

2005-12-03  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c: Include <assert.h>, <common/usersdb.h>.
	(ask_user): New function.
	(cmd_test): Mostly rewritten.
	(cmd_list): Removed function body; add call to usersdb_list.
	(cmd_add, cmd_remove): Stripped.
	Adjusted to new usersdb API.

	* poldi-ctrl.c (cmd_add_user): Removed exit calls.
	(cmd_remove_user): Likewise.

2005-11-19  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_dump): Retrive key size information through
	card_read_key, print key size.
	(cmd_set_key): Adjust to card_read_key API.

2005-11-12  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_test): Adjust to new wait_for_card() API.
	(cmd_set_key, cmd_dump): Adjust to new card_info() API.

	* Makefile.am (poldi_ctrl_CFLAGS): Added include path:
	$(top_srcdir)/src/common.

2005-10-31  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_test): Adjusted to new wait_for_card() API.
	(conversation): New function.
	Use authenticate() instead of duplicating the authentication
	mechanism.
	(cmd_dump): Retrieve and print signing key fingerprint.

2005-10-29  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_remove_user): Print a warning instead of an
	error in case the serial number could not be looked up; set ERR to
	0 in this case and only try to remove key file in case SERIALNO is
	non-zero.
	(cmd_remove_user): Make sure to lookup the serial number before
	removing the user from the user database.

2005-10-26  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (poldi_ctrl_options_cb): Use gpg_error_t instead of
	gpg_err_code_t.
	(cmd_test): Do not call card_close() before "out" label, only
	after "out" label.
	(cmd_add_user): Recognize situations of adding duplicates much
	better; new local variable: skip_userdb.  Added plenty of log
	messages and comments.
	(cmd_set_key): Do not call card_close() before "out" label, only
	after "out" label.
	(cmd_show_key): New local variable: KEY_SEXP; convert key from
	string into s-expression representation and back, so that the user
	sees the key in a standard format.
	(cmd_remove_user): New local variable; NENTRIES_REMOVED; adjust to
	new usersdb_remove_entry() interface.
	(main): New local variable: NCOMMANDS; differentiate case of no
	command being given from that of too many commands being given; be
	more verbose.
	(arg_opts): Include special codes in order to seperate commands
	from options.

2005-10-23  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_remove_user): Be more verbose (through jnlib
	logging).
	Removed dump-shadowed-key command.
	(key_file_create): Replaced parameter ACCOUNT with PWENT.
	(cmd_add_user): Pass PWENT to key_file_create instead of ACCOUNT.
	(cmd_list_users): New local variable LINE_NUMBERS, use it for
	error reporting, do not bail out on corrupt lines.

2005-10-16  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (key_file_create, key_file_remove): Re-ordered functions.
	(key_file_create, key_file_remove, cmd_test, cmd_set_key)
	(cmd_show_key): Use key_filename_construct() instead of
	make_filename() directly.

2005-10-08  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c: Remove `fake-wait-for-card'-feature.

2005-10-01  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (struct poldi_ctrl_opt): New member: WAIT_TIMEOUT.
	(poldi_ctrl_opt): Exten struct initialization.
	(arg_opt_ids): New entry: ARG_WAIT_TIMEOUT.
	(arg_opts): New entry for ARG_WAIT_TIMEOUT.
	(poldi_ctrl_options_cb): Handle ARG_WAIT_TIMEOUT.
	(cmd_test): Pass WAIT_TIMEOUT to card_init.

2005-09-30  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (struct poldi_ctrl_opt): Remove unnecessary, rather
	annoying const attributes.
	(cmd_add_user): Likewise.

2005-09-27  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c: Adjust to new card_init API; pass zero timeout.

2005-07-26  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_test): Remove unnecessary const attributes and
	cast.
	(cmd_dump): Likewise.
	(cmd_remove_user): Likewise.
	(cmd_set_key): Likewise.
	Updated to use new support.h API.
	(cmd_add_user): Fail, if specified serial number does already
	exist in database.
	(cmd_add_user): Fail, if specified user does not exist on system.
	(poldi_ctrl_options_cb): Better interaction with jnlib in respect
	to error propagation.
	(key_file_remove): Do not return error in case of ENOENT.

2005-07-13  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c: Adjust to new card_info() API, use version
	information in order to figure out if CHV3 is necessary for public
	key retrival.

2005-07-12  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_show_key): Only print KEY_STRING, if non-NULL.

2005-01-30  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (sexp_to_string): New function.

2004-11-29  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c: Fix contact address.

2004-11-27  Moritz Schulte  <moritz@g10code.com>

	* poldi-ctrl.c (cmd_test): Adjust card_init caller.
	(cmd_dump): Likewise.
	(cmd_set_key): Likewise.
	Implement require-card-switch option.
	(cmd_test): Do not require that the uid of the current process is
	equal to the one of the user to test authentication for.
