Add hack to allow using an "ecc" key for "ecdsa" or "ecdh".
* cipher/pubkey.c (sexp_to_key): Add optional arg USE. (gcry_pk_encrypt, gcry_pk_decrypt): Call sexp_to_key with usage sign. (gcry_pk_sign, gcry_pk_verify): Call sexp_to_key with usage encrypt. * tests/basic.c (show_sexp): New. (check_pubkey_sign): Print test number and add cases for ecc. (check_pubkey_sign_ecdsa): New. (do_check_one_pubkey): Divert to new function.
The problem we try to address is that in the mdoule specs both, ECDSA
and ECDH have the same alias name "ecc". This patch allows to use for
example gcry_pk_verify with a key that has only "ecc" in it.
- Signed-off-by: Werner Koch <wk@gnupg.org>