summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vcelak <jan.vcelak@nic.cz>2016-02-25 15:21:29 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-06-23 16:57:42 +0200
commitbcfc9040759fa0b83aa66f8c637203ca6fb27890 (patch)
treedddf3d2d6a039107014613dd21379d69ce49b4b8
parent84373c719aca7e0ed7d60eb106224246add3dd76 (diff)
downloadgnutls-bcfc9040759fa0b83aa66f8c637203ca6fb27890.tar.gz
pkcs11: add interface for C_GenerateKey
Signed-off-by: Jan Vcelak <jan.vcelak@nic.cz>
-rw-r--r--lib/pkcs11_int.c11
-rw-r--r--lib/pkcs11_int.h8
2 files changed, 19 insertions, 0 deletions
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
@@ -192,6 +192,17 @@ pkcs11_sign(struct ck_function_list * module,
}
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,
struct ck_mechanism * mechanism,
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
@@ -193,6 +193,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,
struct ck_mechanism * mechanism,