diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-05-22 15:13:20 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-06-03 19:52:29 +0200 |
commit | 4a8552433e86a691c25be6eaa9037da43f9cce37 (patch) | |
tree | dfb2ab3976209ca75c18df65f74619d6859942b0 /lib/pkcs11_int.h | |
parent | a43180ff5c80d23277184691dac5ed97cf97d86f (diff) | |
download | gnutls-4a8552433e86a691c25be6eaa9037da43f9cce37.tar.gz |
Added gnutls_pubkey_t abstract type to handle public keys. It can currently
import/export public keys from existing certificate types as well as from PKCS #11
URL. This allows generating a certificate or certificate request from a given public key
(currently one could only generate them from a given private key).
PKCS#11 API augmented to allow reading arbitrary objects instead of just certificates.
Certtool updated to list those objects.
Diffstat (limited to 'lib/pkcs11_int.h')
-rw-r--r-- | lib/pkcs11_int.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/pkcs11_int.h b/lib/pkcs11_int.h index c0708321f1..86cbba1ce4 100644 --- a/lib/pkcs11_int.h +++ b/lib/pkcs11_int.h @@ -29,6 +29,12 @@ struct pkcs11_url_info size_t certid_raw_size; }; +struct gnutls_pkcs11_obj_st { + gnutls_datum_t raw; + gnutls_pkcs11_obj_type_t type; + struct pkcs11_url_info info; +}; + /* thus function is called for every token in the traverse_tokens * function. Once everything is traversed it is called with NULL tinfo. * It should return 0 if found what it was looking for. @@ -38,7 +44,7 @@ typedef int (*find_func_t)(pakchois_session_t *pks, struct token_info* tinfo, vo int _pkcs11_traverse_tokens (find_func_t find_func, void* input, int leave_session); int pkcs11_url_to_info(const char* url, struct pkcs11_url_info* info); -int pkcs11_get_info(struct pkcs11_url_info *info, gnutls_pkcs11_cert_info_t itype, +int pkcs11_get_info(struct pkcs11_url_info *info, gnutls_pkcs11_obj_info_t itype, void* output, size_t* output_size); int pkcs11_login(pakchois_session_t *pks, struct token_info *info); @@ -48,4 +54,5 @@ extern void* token_data; void pkcs11_rescan_slots(void); int pkcs11_info_to_url(const struct pkcs11_url_info* info, char** url); + #endif |