void gnutls_pubkey_deinit (gnutls_pubkey_t key);
int gnutls_pubkey_get_pk_algorithm (gnutls_pubkey_t key, unsigned int *bits);
-int gnutls_pubkey_import_x509 (gnutls_pubkey_t pkey, gnutls_x509_crt_t crt,
+int gnutls_pubkey_import_x509 (gnutls_pubkey_t key, gnutls_x509_crt_t crt,
unsigned int flags);
int gnutls_pubkey_import_pkcs11 (gnutls_pubkey_t pkey,
gnutls_pkcs11_obj_t crt, unsigned int flags);
gnutls_digest_algorithm_t *
hash, unsigned int *mand);
-int gnutls_pubkey_get_pk_rsa_raw (gnutls_pubkey_t crt,
+int gnutls_pubkey_get_pk_rsa_raw (gnutls_pubkey_t key,
gnutls_datum_t * m, gnutls_datum_t * e);
-int gnutls_pubkey_get_pk_dsa_raw (gnutls_pubkey_t crt,
+int gnutls_pubkey_get_pk_dsa_raw (gnutls_pubkey_t key,
gnutls_datum_t * p, gnutls_datum_t * q,
gnutls_datum_t * g, gnutls_datum_t * y);
const gnutls_datum_t * q,
const gnutls_datum_t * g,
const gnutls_datum_t * y);
-int gnutls_pubkey_import_rsa_raw (gnutls_pubkey_t pubkey,
+int gnutls_pubkey_import_rsa_raw (gnutls_pubkey_t key,
const gnutls_datum_t * m,
const gnutls_datum_t * e);
const gnutls_datum_t * hash_data,
gnutls_datum_t * signature);
-int gnutls_privkey_decrypt_data (gnutls_privkey_t signer,
+int gnutls_privkey_decrypt_data (gnutls_privkey_t key,
unsigned int flags,
const gnutls_datum_t * ciphertext,
gnutls_datum_t * plaintext);
typedef int (*mutex_unlock_func) (void **mutex);
typedef int (*mutex_deinit_func) (void **mutex);
- void gnutls_global_set_mutex (mutex_init_func init, mutex_deinit_func,
- mutex_lock_func, mutex_unlock_func);
+ void gnutls_global_set_mutex (mutex_init_func init, mutex_deinit_func deinit,
+ mutex_lock_func lock, mutex_unlock_func unlock);
typedef void *(*gnutls_alloc_function) (size_t);
typedef void *(*gnutls_calloc_function) (size_t, size_t);
void gnutls_pkcs11_deinit (void);
void gnutls_pkcs11_set_token_function (gnutls_pkcs11_token_callback_t fn,
void *userdata);
-void gnutls_pkcs11_set_pin_function (gnutls_pkcs11_pin_callback_t callback,
- void *data);
+
+void gnutls_pkcs11_set_pin_function (gnutls_pkcs11_pin_callback_t fn,
+ void *userdata);
int gnutls_pkcs11_add_provider (const char *name, const char *params);
-int gnutls_pkcs11_obj_init (gnutls_pkcs11_obj_t * certificate);
+int gnutls_pkcs11_obj_init (gnutls_pkcs11_obj_t * obj);
#define GNUTLS_PKCS11_OBJ_FLAG_LOGIN (1<<0) /* force login in the token for the operation */
#define GNUTLS_PKCS11_OBJ_FLAG_MARK_TRUSTED (1<<1) /* object marked as trusted */
int gnutls_pkcs11_obj_import_url (gnutls_pkcs11_obj_t, const char *url,
unsigned int flags
/* GNUTLS_PKCS11_OBJ_FLAG_* */ );
-int gnutls_pkcs11_obj_export_url (gnutls_pkcs11_obj_t,
+int gnutls_pkcs11_obj_export_url (gnutls_pkcs11_obj_t obj,
gnutls_pkcs11_url_type_t detailed,
char **url);
-void gnutls_pkcs11_obj_deinit (gnutls_pkcs11_obj_t);
+void gnutls_pkcs11_obj_deinit (gnutls_pkcs11_obj_t obj);
int gnutls_pkcs11_obj_export (gnutls_pkcs11_obj_t obj,
void *output_data, size_t * output_data_size);
int gnutls_pkcs11_copy_x509_crt (const char *token_url, gnutls_x509_crt_t crt,
const char *label, unsigned int flags
/* GNUTLS_PKCS11_OBJ_FLAG_* */ );
-int gnutls_pkcs11_copy_x509_privkey (const char *token_url, gnutls_x509_privkey_t crt, const char *label, unsigned int key_usage /*GNUTLS_KEY_* */
- , unsigned int flags
+int gnutls_pkcs11_copy_x509_privkey (const char *token_url, gnutls_x509_privkey_t key,
+ const char *label, unsigned int key_usage /*GNUTLS_KEY_* */, unsigned int flags
/* GNUTLS_PKCS11_OBJ_FLAG_* */ );
int gnutls_pkcs11_delete_url (const char *object_url, unsigned int flags
/* GNUTLS_PKCS11_OBJ_FLAG_* */ );
int gnutls_pkcs11_token_get_url (unsigned int seq,
gnutls_pkcs11_url_type_t detailed,
char **url);
-int gnutls_pkcs11_token_get_info (const char *url, gnutls_pkcs11_token_info_t,
+int gnutls_pkcs11_token_get_info (const char *url, gnutls_pkcs11_token_info_t ttype,
void *output, size_t * output_size);
#define GNUTLS_PKCS11_TOKEN_HW 1
certificate);
const char *gnutls_pkcs11_type_get_name (gnutls_pkcs11_obj_type_t);
-int gnutls_x509_crt_list_import_pkcs11 (gnutls_x509_crt_t * certs, unsigned int cert_max, gnutls_pkcs11_obj_t * const pkcs11_certs, unsigned int flags /* must be zero */
- );
+int gnutls_x509_crt_list_import_pkcs11 (gnutls_x509_crt_t * certs, unsigned int cert_max,
+ gnutls_pkcs11_obj_t * const objs, unsigned int flags /* must be zero */);
/* private key functions...*/
void gnutls_pkcs11_privkey_deinit (gnutls_pkcs11_privkey_t key);
int gnutls_pkcs11_privkey_get_pk_algorithm (gnutls_pkcs11_privkey_t key,
unsigned int *bits);
-int gnutls_pkcs11_privkey_get_info (gnutls_pkcs11_privkey_t crt,
+int gnutls_pkcs11_privkey_get_info (gnutls_pkcs11_privkey_t pkey,
gnutls_pkcs11_obj_info_t itype,
void *output, size_t * output_size);
-int gnutls_pkcs11_privkey_import_url (gnutls_pkcs11_privkey_t key,
+int gnutls_pkcs11_privkey_import_url (gnutls_pkcs11_privkey_t pkey,
const char *url, unsigned int flags);
int gnutls_pkcs11_privkey_export_url (gnutls_pkcs11_privkey_t key,
const gnutls_datum_t * p,
const gnutls_datum_t * q,
const gnutls_datum_t * u,
- const gnutls_datum_t * exp1,
- const gnutls_datum_t * exp2);
+ const gnutls_datum_t * e1,
+ const gnutls_datum_t * e2);
int gnutls_x509_privkey_fix (gnutls_x509_privkey_t key);
int gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key,
/**
* gnutls_pkcs11_set_token_function:
- * @fn: The PIN callback
+ * @fn: The token callback
* @userdata: data to be supplied to callback
*
* This function will set a callback function to be used when a token
/**
* gnutls_pkcs11_obj_init:
- * @crt: The structure to be initialized
+ * @obj: The structure to be initialized
*
* This function will initialize a pkcs11 certificate structure.
*
* negative error value.
**/
int
-gnutls_pkcs11_obj_init (gnutls_pkcs11_obj_t * crt)
+gnutls_pkcs11_obj_init (gnutls_pkcs11_obj_t * obj)
{
- *crt = gnutls_calloc (1, sizeof (struct gnutls_pkcs11_obj_st));
- if (*crt == NULL)
+ *obj = gnutls_calloc (1, sizeof (struct gnutls_pkcs11_obj_st));
+ if (*obj == NULL)
{
gnutls_assert ();
return GNUTLS_E_MEMORY_ERROR;
/**
* gnutls_pkcs11_obj_export:
- * @key: Holds the object
+ * @obj: Holds the object
* @output_data: will contain a certificate PEM or DER encoded
* @output_data_size: holds the size of output_data (and will be
* replaced by the actual size of parameters)
/**
* gnutls_pkcs11_obj_export_url:
- * @crt: Holds the PKCS 11 certificate
+ * @obj: Holds the PKCS 11 certificate
* @detailed: non zero if a detailed URL is required
* @url: will contain an allocated url
*
* negative error value.
**/
int
-gnutls_pkcs11_obj_export_url (gnutls_pkcs11_obj_t cert,
+gnutls_pkcs11_obj_export_url (gnutls_pkcs11_obj_t obj,
gnutls_pkcs11_url_type_t detailed, char **url)
{
int ret;
- ret = pkcs11_info_to_url (&cert->info, detailed, url);
+ ret = pkcs11_info_to_url (&obj->info, detailed, url);
if (ret < 0)
{
gnutls_assert ();
* This function will return a pointer to the DER encoded DN structure
* and the length.
*
- * Returns a negative value on error, and zero on success.
+ * Returns: a negative value on error, and zero on success.
*
* Since: 2.12.0
**/