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

	* support.c (authenticate): Use card_auth() instead of
	card_sign().

	* usersdb.c, usersdb.h: Added documentation.

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

	* support.c (directory_process): New function.
	Include <dirent.h>.

	* support.h (directory_process_cb_t): New type.
	(directory_process): Declare new function.

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

	* support.c (key_lookup_by_username): Removed function.
	(key_lookup_by_serialno): New function.
	(wait_for_card): New parameter: type; pass to card_info.

	* support.h: Include <card.h>.
	(wait_for_card): New parameter: card_key_t type.
	(key_lookup_by_username): Removed function.
	(key_lookup_by_serialno): New function.

	* card.c: Include <card.h>.
	(key_identifier_codes): New array.
	(card_info): Adjust API; read-out fingerprint depending on new
	TYPE parameter.
	(card_decrypt, card_auth): New functions.

	* card.h (card_key_t): New enumeration list.
	(card_info): New parameter: card_kye_t type.
	(card_decrypt, card_auth): Declare new functions.

	* support.c, support.h: Moved usersdb-related code ...
	* usersdb.c, usersdb.h: ... into these new files.
	* Makefile.am (libpoldo_common_a_SOURCES): Added new files.

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

	* card.c (card_read_key): New parameter: *KEY_NBITS, fill with
	size of RSA modulus in case it is non-NULL.
	* card.h (card_read_key): Adjust API.

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

	* support.c (wait_for_card): New parameter: card_key_t type; pass
	to card_info().
	* support.h (wait_for_card): Adjust to new API.
	Include <card.h>.

	* card.h (card_key_t): New type.
	(card_read_key): New parameter: card_key_t type.
	(card_info): Likewise.

	* card.c (key_identifier_codes): New static array.
	(card_read_key): Adjust to new API; return error in case TYPE
	contains an unknown type; lookup key code in KEY_IDENTIFIER_CODES
	instead of hard-coding the code for the signature key.
	Include <card.h>.
	

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

	* support.c, support.h, card.c, card.h: Added code documentation.

	* support.c (challenge_verify): Renamed parameter KEY to
	PUBLIC_KEY.

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

	* support.c (sexp_to_string): Initialize FMT directly, declare
	const.  Added even more comments.
	(key_lookup_by_username): New function (formerly: lookup_key from
	pam_poldi.c).
	Include <jnlib/logging.h>.
	(authenticate): New function (formerly: do_auth from pam_poldi.c).
	(wait_for_card): New function (based on former wait_for_card from
	pam_poldi.c)

	* support.h (key_lookup_by_username): Declare new function.
	(authenticate): Declare new function.
	(wait_for_card): New function.

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

	* support.c (usersdb_remove_entry): Use assert to make verify to
	enforce calling convention.
	(usersdb_remove_entry): New argument: NENTRIES; new local variable
	NENTRIES_REMOVED; count number of removed entries in
	NENTRIES_REMOVED, store number in NENTRIES on success.
	* support.h (usersdb_remove_entry): Adjust declaration.

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

	* support.c (lookup_own_username): New function.
	* support.h (lookup_own_username): Declare.

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

	* support.c (key_filename_construct): New function.
	Include <jnlib/string.h>.
	Include <jnlib/xmalloc.h> instead of <../jnlib/xmalloc.h>.
	* support.h (key_filename_construct): Declare function.

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

	Thanks to Alessandro Rubini:

	* card.c: Include <time.h>.
	(wait_for_card): New parameter: TIMEOUT; new variables T0, T;
	return 1 in case the specified timeout elapsed without any card
	being inserted.
	(card_init): New parameter: TIMEOUT; new variable: RET; pass
	TIMEOUT to wait_for_card();
	* card.h (card_sign): Updated card_init API.

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

	* support.c (username_to_serialno): Renamed function to ...
	(usersdb_lookup_by_username): ... this; changed callers.
	(serialno_to_username): Renamed function to ...
	(usersdb_lookup_by_serialno): ... this; changed callers.
	(usersdb_translate): Remove const attribute for FOUND argument;
	only fill FOUND if non-NULL.
	(usersdb_lookup_by_serialno): Remove const attreibute for USERNAME
	argument.
	(usersdb_lookup_by_username): Remove const attreibute for SERIALNO
	argument.
	* support.h: Updated API.

	* card.c: Some cosmetic changes.

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

	* defs.h.in (POLDI_OLD_CARD_KEY_RETRIVAL_EXPLANATION): New symbol.
	(POLDI_PIN2_QUERY_MSG, POLDI_PIN3_QUERY_MSG): Change strings.

	* card.c: Include <assert.h>
	(card_info): New API, return card version information, if
	requested.
	* card.h: Update card_info() API.

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

	* options.c (options_parse_conf): Do not fail if file does not
	exist.

	* card.c (wait_for_new_card): Renamed to ...
	(wait_for_card): ... this; new argument: require_card_switch;
	adjust function accordingly; adjust callers.
	(card_init): Rename argument `wait_for_card' to `wait'; new
	argument: require_card_switch; pass to wait_for_card.
	* card.h (card_open): Update declaration.

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

	* support.c (file_to_string): NUL-terminate string.
	* card.c (wait_for_new_card): New function, merged from gscutils ...
	(card_init): ... use it here.

