g10: Simplify "factory-reset" procedure.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 30 Oct 2017 02:59:11 +0000 (11:59 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 30 Oct 2017 02:59:11 +0000 (11:59 +0900)
commitd63b7966cdd72548c60466c620de5cd6104a779e
treea67df8ed3ecc8b06959ac4afaae762726db8acda
parentf6ab97fd9620bb8f512ffb471a66e5f96098a7cc
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>
g10/card-util.c