card: Allow "yubikey disable" only for Yubikey-5 and later.
authorWerner Koch <wk@gnupg.org>
Thu, 28 Mar 2019 09:56:28 +0000 (10:56 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 28 Mar 2019 09:57:27 +0000 (10:57 +0100)
commit2f761251c5730a9ad113fa58466addc9c2372da8
tree1f024540d015ea92f086598a5d31b3f0a97db557
parent5a3055eb722e61126748e83564e1bba42807d722
card: Allow "yubikey disable" only for Yubikey-5 and later.

* tools/card-yubikey.c (yubikey_commands): Add new arg INFO and test
for Yubikey-5.
* tools/gpg-card.c (cmd_yubikey): Pass info to yubikey_commands.
--

The configuration can be read from a Yubikey-4 but not be written.
The mode command is also not useful because it allows only the
selection of transports.  It does not allow to disable single
applications based on one transport (like OPGP and PIV).  Thsi patch
shows an appropriate error message.

Signed-off-by: Werner Koch <wk@gnupg.org>
tools/card-yubikey.c
tools/gpg-card.c
tools/gpg-card.h