g10: Simplify "factory-reset" procedure.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 30 Oct 2017 02:59:11 +0000 (11:59 +0900)
committerWerner Koch <wk@gnupg.org>
Mon, 6 Nov 2017 11:09:37 +0000 (12:09 +0100)
commitf183b9768b42a6792c55a6129488bd8fbf5e8e6d
tree35e4479400358d0a23f9e4779946e5b23dd49b93
parent6070f5a61d4d17ff437c69e1b708d49d107c22dc
g10: Simplify "factory-reset" procedure.

* g10/card-util.c (factory_reset): Simplify.

--

In this summer, I got report about old code before this change didn't
work with newer Yubikey.  I got another report test version of OpenPGP
card V3.3 implementation didn't work, either.  Then, I confirmed that
according to the OpenPGP card specification, the procedure of old code
is not expected by its author.

This change simplify "factory-reset" as simple.

Only versions of Gnuk 1.2.2, 1.2.3, 1.2.4, won't work with this
change.  That's because the factory-reset feature of Gnuk was
introduced by reading the implementation of GnuPG, instead of reading
the specification.  Gnuk 1.2.5 and later works well.  All OpenPGPcard
implementations I have work well (2.0, 2.1, 2.2, test version of 3).

GnuPG-bug-id: 3286
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
(cherry picked from commit d63b7966cdd72548c60466c620de5cd6104a779e)
g10/card-util.c