scd: Cleanup SERIALNO protocol.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 18 Jan 2017 06:48:50 +0000 (15:48 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 18 Jan 2017 07:03:47 +0000 (16:03 +0900)
commit79cea89774e6327b6785e22b7057f9e3e188ac2b
tree6ac0f0a6e4df8a0d4995617c5a0fc9f659cbd3f4
parent8b1f24a29ebc7651437c01990215a55b1136dae0
scd: Cleanup SERIALNO protocol.

* scd/app.c (app_get_serial_and_stamp): Remove.
(app_get_serialno): New.
(app_write_learn_status): Use send_status_direct.
(app_getattr): Use app_get_serialno for SERIALNO and
send with send_status_direct.
* scd/app-openpgp.c (do_getattr): Likewise.
* scd/command.c (cmd_serialno): Don't send TIMESTAMP of 0.
(cmd_learn): Likewise.  Don't inquire with TIMESTAMP of 0.

--

In the SERIALNO protocol, timestamp used to be considered, but had never
used at all.  In the new implementation, removed card/token is always
detected and connection becomes invalid, no timestamp is required any
more.  Examined scute and poldi as well for this protocol change.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
doc/scdaemon.texi
scd/app-common.h
scd/app-openpgp.c
scd/app.c
scd/command.c