From bcfc9040759fa0b83aa66f8c637203ca6fb27890 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Thu, 25 Feb 2016 15:21:29 +0100 Subject: pkcs11: add interface for C_GenerateKey Signed-off-by: Jan Vcelak --- lib/pkcs11_int.c | 11 +++++++++++ lib/pkcs11_int.h | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/pkcs11_int.c b/lib/pkcs11_int.c index cc23ec67c3..2994baf113 100644 --- a/lib/pkcs11_int.c +++ b/lib/pkcs11_int.c @@ -191,6 +191,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 ee44737f6e..62cf0f0905 100644 --- a/lib/pkcs11_int.h +++ b/lib/pkcs11_int.h @@ -192,6 +192,14 @@ static inline int pk_to_genmech(gnutls_pk_algorithm_t pk, ck_key_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, -- cgit v1.2.1