aes_gcm_cipher_setkey (void *_ctx, const void *userkey, size_t keysize)
{
struct gcm_padlock_aes_ctx *ctx = _ctx;
- int ret;
GCM_SET_KEY(ctx, padlock_aes_set_encrypt_key, padlock_aes_encrypt, keysize, userkey);
#ifdef HAVE_LIBNETTLE
struct aes_ctx nc;
#endif
- int ret;
memset(_ctx, 0, sizeof(struct padlock_cipher_data));
void *dst, size_t dst_size);
/* asm */
-unsigned int padlock_capability();
-void padlock_reload_key();
+unsigned int padlock_capability(void);
+void padlock_reload_key(void);
int padlock_ecb_encrypt(void *out, const void *inp,
struct padlock_cipher_data *ctx, size_t len);
int padlock_cbc_encrypt(void *out, const void *inp,
/*
- * Copyright (C) 2001, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ * Copyright (C) 2001, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
* Software Foundation, Inc.
*
* Author: Nikos Mavrogiannopoulos
{
int ret;
opaque concat[MAX_HASH_SIZE];
- digest_hd_st td;
gnutls_datum_t dconcat;
gnutls_digest_algorithm_t hash_algo;
gnutls_protocol_t ver = gnutls_protocol_get_version (session);
const void *secret, int secret_size,
const void *seed, int seed_size, void *result)
{
- digest_hd_st td1;
int ret;
ret = _gnutls_hmac_fast (algorithm, secret, secret_size, seed, seed_size, result);
/*
- * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 Free
+ * Copyright (C) 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010, 2011 Free
* Software Foundation, Inc.
*
* Author: Nikos Mavrogiannopoulos
const gnutls_datum_t * data, void *result,
size_t * result_size)
{
- digest_hd_st td;
int ret;
int hash_len = _gnutls_hash_get_algo_len (HASH2MAC (algo));
int
gnutls_certificate_set_x509_trust_file (gnutls_certificate_credentials_t
- res, const char *cafile,
+ cred, const char *cafile,
gnutls_x509_crt_fmt_t type);
int gnutls_certificate_set_x509_trust_mem (gnutls_certificate_credentials_t
res, const gnutls_datum_t * ca,
const char *subkey_id,
gnutls_openpgp_crt_fmt_t format);
- int
- gnutls_certificate_set_openpgp_keyring_mem
- (gnutls_certificate_credentials_t c, const unsigned char *data,
- size_t dlen, gnutls_openpgp_crt_fmt_t format);
+ int gnutls_certificate_set_openpgp_keyring_mem
+ (gnutls_certificate_credentials_t c, const unsigned char *data,
+ size_t dlen, gnutls_openpgp_crt_fmt_t format);
- int
- gnutls_certificate_set_openpgp_keyring_file
- (gnutls_certificate_credentials_t c, const char *file,
- gnutls_openpgp_crt_fmt_t format);
+ int gnutls_certificate_set_openpgp_keyring_file
+ (gnutls_certificate_credentials_t c, const char *file,
+ gnutls_openpgp_crt_fmt_t format);
#ifdef __cplusplus
}
gnutls_x509_crt_fmt_t format,
void *output_data, size_t * output_data_size);
int gnutls_x509_crt_get_issuer_dn (gnutls_x509_crt_t cert, char *buf,
- size_t * sizeof_buf);
+ size_t * buf_size);
int gnutls_x509_crt_get_issuer_dn_oid (gnutls_x509_crt_t cert, int indx,
- void *oid, size_t * sizeof_oid);
+ void *oid, size_t * oid_size);
int gnutls_x509_crt_get_issuer_dn_by_oid (gnutls_x509_crt_t cert,
const char *oid, int indx,
unsigned int raw_flag,
- void *buf, size_t * sizeof_buf);
+ void *buf, size_t * buf_size);
int gnutls_x509_crt_get_dn (gnutls_x509_crt_t cert, char *buf,
- size_t * sizeof_buf);
+ size_t * buf_size);
int gnutls_x509_crt_get_dn_oid (gnutls_x509_crt_t cert, int indx,
- void *oid, size_t * sizeof_oid);
+ void *oid, size_t * oid_size);
int gnutls_x509_crt_get_dn_by_oid (gnutls_x509_crt_t cert,
const char *oid, int indx,
unsigned int raw_flag, void *buf,
- size_t * sizeof_buf);
+ size_t * buf_size);
int gnutls_x509_crt_check_hostname (gnutls_x509_crt_t cert,
const char *hostname);
unsigned int *critical);
int gnutls_x509_crt_get_subject_unique_id (gnutls_x509_crt_t crt, char *buf,
- size_t * sizeof_buf);
+ size_t * buf_size);
int gnutls_x509_crt_get_issuer_unique_id (gnutls_x509_crt_t crt, char *buf,
- size_t * sizeof_buf);
+ size_t * buf_size);
#define GNUTLS_CRL_REASON_UNUSED 128
#define GNUTLS_CRL_REASON_KEY_COMPROMISE 64
int gnutls_x509_crt_get_subject_alt_othername_oid (gnutls_x509_crt_t cert,
unsigned int seq,
- void *ret,
- size_t * ret_size);
+ void *oid,
+ size_t * oid_size);
int gnutls_x509_crt_get_issuer_alt_name (gnutls_x509_crt_t cert,
unsigned int seq, void *ret,
/* Read extensions by OID. */
int gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, int indx,
- void *oid, size_t * sizeof_oid);
+ void *oid, size_t * oid_size);
int gnutls_x509_crt_get_extension_by_oid (gnutls_x509_crt_t cert,
const char *oid, int indx,
- void *buf,
- size_t * sizeof_buf,
+ void *buf, size_t * buf_size,
unsigned int *critical);
/* Read extensions by sequence number. */
int gnutls_x509_crt_get_extension_info (gnutls_x509_crt_t cert, int indx,
- void *oid, size_t * sizeof_oid,
+ void *oid, size_t * oid_size,
unsigned int *critical);
int gnutls_x509_crt_get_extension_data (gnutls_x509_crt_t cert, int indx,
void *data, size_t * sizeof_data);
int gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert,
gnutls_digest_algorithm_t algo,
- void *buf, size_t * sizeof_buf);
+ void *buf, size_t * buf_size);
int gnutls_x509_crt_get_key_purpose_oid (gnutls_x509_crt_t cert,
int indx, void *oid,
- size_t * sizeof_oid,
+ size_t * oid_size,
unsigned int *critical);
int gnutls_x509_crt_set_key_purpose_oid (gnutls_x509_crt_t cert,
const void *oid,
/*
- * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
* Free Software Foundation, Inc.
*
* Author: Timo Schulz, Nikos Mavrogiannopoulos
/**
* gnutls_certificate_set_openpgp_keyring_file:
- * @cred: A certificate credentials structure
+ * @c: A certificate credentials structure
* @file: filename of the keyring.
* @format: format of keyring.
*
* negative error value.
**/
int
-gnutls_certificate_set_openpgp_keyring_file (gnutls_certificate_credentials_t
- cred, const char *file,
+gnutls_certificate_set_openpgp_keyring_file (gnutls_certificate_credentials_t c,
+ const char *file,
gnutls_openpgp_crt_fmt_t format)
{
gnutls_datum_t ring;
size_t size;
int rc;
- if (!cred || !file)
+ if (!c || !file)
{
gnutls_assert ();
return GNUTLS_E_INVALID_REQUEST;
}
rc =
- gnutls_certificate_set_openpgp_keyring_mem (cred, ring.data, ring.size,
+ gnutls_certificate_set_openpgp_keyring_mem (c, ring.data, ring.size,
format);
free (ring.data);
ck_session_handle_t pks = 0;
struct p11_kit_uri *info = NULL;
ck_rv_t rv;
- size_t id_size;
- opaque id[20];
struct ck_attribute a[10], p[10];
ck_object_handle_t pub, priv;
unsigned long _bits = bits;