diff options
author | Jan Vcelak <jan.vcelak@nic.cz> | 2016-02-25 15:21:29 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-03-08 15:13:30 +0100 |
commit | c810c06918d1ac4cfa651bc4420a1a93734a5869 (patch) | |
tree | e6079bdff061edb2d9aae95b8620485a44029315 /lib | |
parent | 174b1f89fde2ebf3857069504d1c3b180545b941 (diff) | |
download | gnutls-c810c06918d1ac4cfa651bc4420a1a93734a5869.tar.gz |
pkcs11: add interface for C_GenerateKey
Signed-off-by: Jan Vcelak <jan.vcelak@nic.cz>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pkcs11_int.c | 11 | ||||
-rw-r--r-- | lib/pkcs11_int.h | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/pkcs11_int.c b/lib/pkcs11_int.c index 848b8b94b0..2ae35e372d 100644 --- a/lib/pkcs11_int.c +++ b/lib/pkcs11_int.c @@ -185,6 +185,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 394da86cb3..0855787690 100644 --- a/lib/pkcs11_int.h +++ b/lib/pkcs11_int.h @@ -213,6 +213,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, struct ck_mechanism * mechanism, |