scd: GENKEY updates the public key in APP.
authorNIIBE Yutaka <gniibe@fsij.org>
Thu, 20 Oct 2016 07:25:47 +0000 (16:25 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Thu, 20 Oct 2016 07:25:47 +0000 (16:25 +0900)
commitb680f79cc112c4831293e259d7db2921bcd783a4
treeef20d9851020b3d7ff2369f41fde675203192e37
parent980c037bedb968ddf155dd334c0a70b918a17759
scd: GENKEY updates the public key in APP.

* scd/app-openpgp.c (rsa_read_pubkey, ecc_read_pubkey): New.
(read_public_key): New.
(get_public_key, do_genkey): Use read_public_key.

--

With this change, since GENKEY updates the public key (pk[keyno].key) in
APP, READKEY will be possible after the command even for the old
card (version <= 0x0100).

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/app-openpgp.c