summaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-03-01 13:36:01 +0100
committerWerner Koch <wk@gnupg.org>2017-03-01 13:36:01 +0100
commit2bbdeb8ee87a6c7ec211be16391a11b7c6030bed (patch)
treeb00d826be8111cd5ec1786bd88debf29b8867db6 /common/util.h
parentspeedo,w32: Install sks-keyservers.netCA.pem. (diff)
downloadgnupg2-2bbdeb8ee87a6c7ec211be16391a11b7c6030bed.tar.xz
gnupg2-2bbdeb8ee87a6c7ec211be16391a11b7c6030bed.zip
gpg: Allow creating keys using an existing ECC key.
* common/sexputil.c (get_pk_algo_from_canon_sexp): Remove arg R_ALGO. Change to return the algo id. Reimplement using get_pk_algo_from_key. * g10/keygen.c (check_keygrip): Adjust for change. * sm/certreqgen-ui.c (check_keygrip): Ditto. -- GnuPG-bug-id: 2976 Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/util.h b/common/util.h
index 4e871d289..c0aa57a1e 100644
--- a/common/util.h
+++ b/common/util.h
@@ -195,10 +195,10 @@ gpg_error_t get_rsa_pk_from_canon_sexp (const unsigned char *keydata,
size_t *r_nlen,
unsigned char const **r_e,
size_t *r_elen);
-gpg_error_t get_pk_algo_from_canon_sexp (const unsigned char *keydata,
- size_t keydatalen,
- const char **r_algo);
+
int get_pk_algo_from_key (gcry_sexp_t key);
+int get_pk_algo_from_canon_sexp (const unsigned char *keydata,
+ size_t keydatalen);
/*-- convert.c --*/
int hex2bin (const char *string, void *buffer, size_t length);