g10: check_pin_for_key_operation should be just before genkey.
* g10/card-util.c (generate_card_keys): Check PIN later. (card_generate_subkey): Likewise.
Changing key attribute resets PIN authentication status. So, CHECKPIN
should be after that, before key generation. Note that CHECKPIN is
done for binding signature.
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>