scd:openpgp: Restructure the pin2hash_id_kdf function.
* scd/app-openpgp.c (wipe_and_free_string, wipe_and_free): Enable functions. (pin2hash_if_kdf): Change interface. The input PIN is not anymore changed. Further there are no more assumptions about the length of the provided buffer. (verify_a_chv): Adjust for changed pin2hash_if_kdf. (verify_chv2): Ditto (verify_chv3): Ditto. (do_change_pin): Ditto. (do_sign): Ditto.
Note that this a part of the patch
63bda3aad8ec4163b0241f64e8b587d665d650c3 which we used in 2.4 to
implement a PIN cache. For easier backporting we need to add this
here.