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.
