From: Jan Vcelak Date: Thu, 25 Feb 2016 14:21:29 +0000 (+0100) Subject: pkcs11: add interface for C_GenerateKey X-Git-Tag: gnutls_3_5_0~313 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88fbd274df32705424c2c752c3ac32b314ee2a94;p=thirdparty%2Fgnutls.git pkcs11: add interface for C_GenerateKey Signed-off-by: Jan Vcelak --- diff --git a/lib/pkcs11_int.c b/lib/pkcs11_int.c index a2277b8823..e8517d5cfd 100644 --- a/lib/pkcs11_int.c +++ b/lib/pkcs11_int.c @@ -184,6 +184,17 @@ pkcs11_sign(struct ck_function_list * module, signature_len); } +ck_rv_t +pkcs11_generate_key(struct ck_function_list * module, + ck_session_handle_t sess, + struct ck_mechanism * mechanism, + struct ck_attribute * templ, + unsigned long count, + ck_object_handle_t * key) +{ + return (module)->C_GenerateKey(sess, mechanism, templ, count, key); +} + ck_rv_t pkcs11_generate_key_pair(struct ck_function_list * module, ck_session_handle_t sess, diff --git a/lib/pkcs11_int.h b/lib/pkcs11_int.h index 6c5f266840..272e426ae2 100644 --- a/lib/pkcs11_int.h +++ b/lib/pkcs11_int.h @@ -212,6 +212,14 @@ static inline int pk_to_genmech(gnutls_pk_algorithm_t pk, ck_key_type_t *type) ck_object_class_t pkcs11_type_to_class(gnutls_pkcs11_obj_type_t type); +ck_rv_t +pkcs11_generate_key(struct ck_function_list * module, + ck_session_handle_t sess, + struct ck_mechanism * mechanism, + struct ck_attribute * templ, + unsigned long count, + ck_object_handle_t * key); + ck_rv_t pkcs11_generate_key_pair(struct ck_function_list * module, ck_session_handle_t sess,