scd: Support changing key attribute back to RSA.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 30 Mar 2018 00:59:09 +0000 (09:59 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 30 Mar 2018 00:59:09 +0000 (09:59 +0900)
commit29692718768c28c524be6306081ab1852e75fe07
tree2014caf3b9e0c0f169b7f1bdcbed91a103f727fe
parenta1515b3bbc10a210040dda3b482bcdb933fa8d7c
scd: Support changing key attribute back to RSA.

* scd/app-openpgp.c (change_rsa_keyattr): Try usual RSA.

--

In the OpenPGP card specification, there are multiple options to
support RSA (having P and Q or not, etc.), and it is implementation
dependent.  Since GnuPG doesn't have knowledge which card
implementation support which option and there is no way (yet) for card
to express itself which key attributes are supported, we haven't
supported key attribute change back to RSA.  But, many card
implementation uses P and Q, try this option.  If other cases,
factory-reset would be easier option.

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