From: Simon Josefsson Date: Fri, 9 Sep 2011 07:10:28 +0000 (+0200) Subject: Fix build errors. X-Git-Tag: gnutls_3_0_3~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98dfaef4fd5d5a763a60c364fb0c74316d8fb6bc;p=thirdparty%2Fgnutls.git Fix build errors. --- diff --git a/lib/accelerated/intel/aes-gcm-padlock.c b/lib/accelerated/intel/aes-gcm-padlock.c index 241f563352..d60c0a61e9 100644 --- a/lib/accelerated/intel/aes-gcm-padlock.c +++ b/lib/accelerated/intel/aes-gcm-padlock.c @@ -89,7 +89,6 @@ static int 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); diff --git a/lib/accelerated/intel/aes-padlock.c b/lib/accelerated/intel/aes-padlock.c index 88bf934349..a0bf838601 100644 --- a/lib/accelerated/intel/aes-padlock.c +++ b/lib/accelerated/intel/aes-padlock.c @@ -62,7 +62,6 @@ int padlock_aes_cipher_setkey(void *_ctx, const void *userkey, size_t keysize) #ifdef HAVE_LIBNETTLE struct aes_ctx nc; #endif - int ret; memset(_ctx, 0, sizeof(struct padlock_cipher_data)); diff --git a/lib/accelerated/intel/aes-padlock.h b/lib/accelerated/intel/aes-padlock.h index 35e1e4a38e..ea3e2c6a7a 100644 --- a/lib/accelerated/intel/aes-padlock.h +++ b/lib/accelerated/intel/aes-padlock.h @@ -33,8 +33,8 @@ int padlock_aes_ecb_encrypt(void *_ctx, const void *src, size_t src_size, 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, diff --git a/lib/gnutls_sig.c b/lib/gnutls_sig.c index c906676411..5500148460 100644 --- a/lib/gnutls_sig.c +++ b/lib/gnutls_sig.c @@ -1,5 +1,5 @@ /* - * 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 @@ -419,7 +419,6 @@ _gnutls_handshake_verify_cert_vrfy12 (gnutls_session_t session, { 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); diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index 5fb782a8d7..8eda274e90 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -791,7 +791,6 @@ _gnutls_cal_PRF_A (gnutls_mac_algorithm_t algorithm, 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); diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index e05dd4d47b..79b17d5f51 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -1,5 +1,5 @@ /* - * 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 @@ -556,7 +556,6 @@ gnutls_fingerprint (gnutls_digest_algorithm_t algo, 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)); diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index c61599ac10..3488c555ee 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -1081,7 +1081,7 @@ gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session); 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, diff --git a/lib/includes/gnutls/openpgp.h b/lib/includes/gnutls/openpgp.h index 14d483fbc9..c3cedf8887 100644 --- a/lib/includes/gnutls/openpgp.h +++ b/lib/includes/gnutls/openpgp.h @@ -345,15 +345,13 @@ extern "C" 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 } diff --git a/lib/includes/gnutls/x509.h b/lib/includes/gnutls/x509.h index 35a8b94dd4..9344558ebe 100644 --- a/lib/includes/gnutls/x509.h +++ b/lib/includes/gnutls/x509.h @@ -119,21 +119,21 @@ extern "C" 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); @@ -157,10 +157,10 @@ extern "C" 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 @@ -222,8 +222,8 @@ extern "C" 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, @@ -265,16 +265,15 @@ extern "C" /* 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); @@ -593,11 +592,11 @@ extern "C" 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, diff --git a/lib/openpgp/gnutls_openpgp.c b/lib/openpgp/gnutls_openpgp.c index 5bb97fadc5..ae7320aaf6 100644 --- a/lib/openpgp/gnutls_openpgp.c +++ b/lib/openpgp/gnutls_openpgp.c @@ -1,5 +1,5 @@ /* - * 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 @@ -522,7 +522,7 @@ gnutls_openpgp_count_key_names (const gnutls_datum_t * cert) /** * 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. * @@ -535,15 +535,15 @@ gnutls_openpgp_count_key_names (const gnutls_datum_t * cert) * 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; @@ -558,7 +558,7 @@ gnutls_certificate_set_openpgp_keyring_file (gnutls_certificate_credentials_t } 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); diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c index ffc5ac6ed3..479613c03e 100644 --- a/lib/pkcs11_privkey.c +++ b/lib/pkcs11_privkey.c @@ -423,8 +423,6 @@ gnutls_pkcs11_privkey_generate (const char* url, 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;