scd:piv: Allow writecert to only write matching certs.
authorWerner Koch <wk@gnupg.org>
Fri, 1 Mar 2019 11:58:56 +0000 (12:58 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 1 Mar 2019 11:58:56 +0000 (12:58 +0100)
commit696d4c290dd4945b693263721f606b5049b9569d
treebebe8e3a782d6dc94107150a40c50267dfbcf3cf
parent280baee72dcb0ca54ce99b524bc2125cbc38e0e4
scd:piv: Allow writecert to only write matching certs.

* scd/app-piv.c (do_readkey): Read the key from the cert here instead
of letting the upper layer do this.
(do_writecert): Check that the cert matches the key and that a key has
already been generated.

Signed-off-by: Werner Koch <wk@gnupg.org>
scd/app-piv.c