]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
pkcs11: add interface for C_GenerateKey
authorJan Vcelak <jan.vcelak@nic.cz>
Thu, 25 Feb 2016 14:21:29 +0000 (15:21 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 26 Feb 2016 12:34:09 +0000 (13:34 +0100)
Signed-off-by: Jan Vcelak <jan.vcelak@nic.cz>
lib/pkcs11_int.c
lib/pkcs11_int.h

index a2277b8823b89eb4f84bfe29461e1f87f12062ae..e8517d5cfdceb2177e6f783d73637bd38e5d87b0 100644 (file)
@@ -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,
index 6c5f266840444bdf57e480f58cd30a16d800bf66..272e426ae27d089d6095797a5eff863d32f31141 100644 (file)
@@ -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,