diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2005-05-27 01:43:56 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2005-05-27 01:43:56 +0000 |
commit | 83a03c54abe2f669f1a376da4b4d396121d531df (patch) | |
tree | e1e87d2b23321662f0ffe2cf18eed7cd366d3ffc /lib | |
parent | 5d65638961aab75ec81dc56801b8adf4df740b30 (diff) | |
download | gnutls-83a03c54abe2f669f1a376da4b4d396121d531df.tar.gz |
eliminated some warnings.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/auth_anon.c | 6 | ||||
-rw-r--r-- | lib/auth_cert.c | 21 | ||||
-rw-r--r-- | lib/auth_dhe.c | 6 | ||||
-rw-r--r-- | lib/auth_rsa.c | 3 | ||||
-rw-r--r-- | lib/auth_rsa_export.c | 3 | ||||
-rw-r--r-- | lib/auth_srp.c | 8 | ||||
-rw-r--r-- | lib/auth_srp_passwd.c | 3 | ||||
-rw-r--r-- | lib/auth_srp_rsa.c | 3 | ||||
-rw-r--r-- | lib/ext_srp.c | 2 | ||||
-rw-r--r-- | lib/gnutls_cert.c | 3 | ||||
-rw-r--r-- | lib/gnutls_handshake.c | 8 | ||||
-rw-r--r-- | lib/gnutls_state.c | 2 | ||||
-rw-r--r-- | lib/gnutls_ui.c | 3 | ||||
-rw-r--r-- | lib/gnutls_x509.c | 3 | ||||
-rw-r--r-- | lib/x509/pkcs12_bag.c | 2 |
15 files changed, 49 insertions, 27 deletions
diff --git a/lib/auth_anon.c b/lib/auth_anon.c index 3933a78dab..7aed922152 100644 --- a/lib/auth_anon.c +++ b/lib/auth_anon.c @@ -69,7 +69,8 @@ static int gen_anon_server_kx(gnutls_session_t session, opaque ** data) gnutls_dh_params_t dh_params; gnutls_anon_server_credentials_t cred; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_ANON, NULL); + cred = (gnutls_anon_server_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_ANON, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -115,7 +116,8 @@ static int proc_anon_client_kx(gnutls_session_t session, opaque * data, bits = _gnutls_dh_get_allowed_prime_bits(session); - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_ANON, NULL); + cred = (gnutls_anon_server_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_ANON, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/auth_cert.c b/lib/auth_cert.c index 7f8e122215..7050293d9c 100644 --- a/lib/auth_cert.c +++ b/lib/auth_cert.c @@ -378,7 +378,8 @@ static int call_get_cert_callback(gnutls_session_t session, gnutls_certificate_type_t type = gnutls_certificate_type_get(session); gnutls_certificate_credentials_t cred; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -479,7 +480,8 @@ static int _select_client_cert(gnutls_session_t session, int issuers_dn_length; gnutls_datum_t *issuers_dn = NULL; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -780,7 +782,8 @@ int _gnutls_proc_x509_server_certificate(gnutls_session_t session, int peer_certificate_list_size = 0; gnutls_datum_t tmp; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -908,7 +911,8 @@ int _gnutls_proc_openpgp_server_certificate(gnutls_session_t session, int peer_certificate_list_size = 0; gnutls_datum_t tmp, akey = { NULL, 0 }; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -1104,7 +1108,8 @@ int _gnutls_proc_cert_cert_req(gnutls_session_t session, opaque * data, gnutls_pk_algorithm_t pk_algos[MAX_SIGN_ALGOS]; int pk_algos_length; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -1277,7 +1282,8 @@ int _gnutls_gen_cert_server_cert_req(gnutls_session_t session, * performance. */ - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -1545,7 +1551,8 @@ int _gnutls_server_select_cert(gnutls_session_t session, int idx, ret; gnutls_certificate_credentials_t cred; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/auth_dhe.c b/lib/auth_dhe.c index ded7aa9565..049cc35d1c 100644 --- a/lib/auth_dhe.c +++ b/lib/auth_dhe.c @@ -92,7 +92,8 @@ static int gen_dhe_server_kx(gnutls_session_t session, opaque ** data) gnutls_certificate_credentials_t cred; gnutls_dh_params_t dh_params; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; @@ -234,7 +235,8 @@ static int proc_dhe_client_kx(gnutls_session_t session, opaque * data, const mpi_t *mpis; gnutls_dh_params_t dh_params; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/auth_rsa.c b/lib/auth_rsa.c index 04f816dc3c..662cbf6f4d 100644 --- a/lib/auth_rsa.c +++ b/lib/auth_rsa.c @@ -145,7 +145,8 @@ int _gnutls_get_private_rsa_params(gnutls_session_t session, gnutls_certificate_credentials_t cred; gnutls_rsa_params_t rsa_params; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/auth_rsa_export.c b/lib/auth_rsa_export.c index 1c5a8223cb..41d2da374f 100644 --- a/lib/auth_rsa_export.c +++ b/lib/auth_rsa_export.c @@ -82,7 +82,8 @@ static int gen_rsa_export_server_kx(gnutls_session_t session, cert_auth_info_t info; gnutls_certificate_credentials_t cred; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/auth_srp.c b/lib/auth_srp.c index 3a4201d9da..a9c61bd337 100644 --- a/lib/auth_srp.c +++ b/lib/auth_srp.c @@ -247,7 +247,10 @@ int _gnutls_gen_srp_client_kx(gnutls_session_t session, opaque ** data) uint8 *data_a; char *username, *password; char buf[64]; - const gnutls_srp_client_credentials_t cred = + gnutls_srp_client_credentials_t cred; + + + cred = (gnutls_srp_client_credentials_t) _gnutls_get_cred(session->key, GNUTLS_CRD_SRP, NULL); if (cred == NULL) { @@ -652,8 +655,9 @@ int _gnutls_proc_srp_server_kx(gnutls_session_t session, opaque * data, opaque hd[SRP_MAX_HASH_SIZE]; char *username, *password; ssize_t data_size = _data_size; + gnutls_srp_client_credentials_t cred; - const gnutls_srp_client_credentials_t cred = + cred = (gnutls_srp_client_credentials_t) _gnutls_get_cred(session->key, GNUTLS_CRD_SRP, NULL); if (cred == NULL) { diff --git a/lib/auth_srp_passwd.c b/lib/auth_srp_passwd.c index 3d92d7f190..d4386f5caf 100644 --- a/lib/auth_srp_passwd.c +++ b/lib/auth_srp_passwd.c @@ -242,7 +242,8 @@ int _gnutls_srp_pwd_read_entry(gnutls_session_t state, char *username, } entry = *_entry; - cred = _gnutls_get_cred(state->key, GNUTLS_CRD_SRP, NULL); + cred = (gnutls_srp_server_credentials_t) + _gnutls_get_cred(state->key, GNUTLS_CRD_SRP, NULL); if (cred == NULL) { gnutls_assert(); _gnutls_srp_entry_free(entry); diff --git a/lib/auth_srp_rsa.c b/lib/auth_srp_rsa.c index 2f9b694c16..1107547445 100644 --- a/lib/auth_srp_rsa.c +++ b/lib/auth_srp_rsa.c @@ -97,7 +97,8 @@ static int gen_srp_cert_server_kx(gnutls_session_t session, opaque ** data) ddata.data = *data; ddata.size = data_size; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/ext_srp.c b/lib/ext_srp.c index cb9260c326..baff841c34 100644 --- a/lib/ext_srp.c +++ b/lib/ext_srp.c @@ -85,7 +85,7 @@ int _gnutls_srp_send_params(gnutls_session_t session, opaque * data, /* this function sends the client extension data (username) */ if (session->security_parameters.entity == GNUTLS_CLIENT) { - const gnutls_srp_client_credentials_t cred = + gnutls_srp_client_credentials_t cred = (gnutls_srp_client_credentials_t) _gnutls_get_cred(session->key, GNUTLS_CRD_SRP, NULL); if (cred == NULL) diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c index d259db78e0..e0a3d1cf7e 100644 --- a/lib/gnutls_cert.c +++ b/lib/gnutls_cert.c @@ -402,7 +402,8 @@ int _gnutls_openpgp_cert_verify_peers(gnutls_session_t session, if (info == NULL) return GNUTLS_E_INVALID_REQUEST; - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index ad95108c47..e1a9a357b4 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -2401,8 +2401,8 @@ inline static int check_server_params(gnutls_session_t session, */ if (cred_type == GNUTLS_CRD_CERTIFICATE) { int delete; - gnutls_certificate_credentials_t x509_cred = - _gnutls_get_cred(session->key, cred_type, NULL); + gnutls_certificate_credentials_t x509_cred = + (gnutls_certificate_credentials_t)_gnutls_get_cred(session->key, cred_type, NULL); if (x509_cred != NULL) { dh_params = @@ -2428,7 +2428,7 @@ inline static int check_server_params(gnutls_session_t session, #ifdef ENABLE_ANON } else if (cred_type == GNUTLS_CRD_ANON) { gnutls_anon_server_credentials_t anon_cred = - _gnutls_get_cred(session->key, cred_type, NULL); + (gnutls_anon_server_credentials_t)_gnutls_get_cred(session->key, cred_type, NULL); if (anon_cred != NULL) { dh_params = _gnutls_anon_get_dh_params(anon_cred, session); @@ -2485,7 +2485,7 @@ int _gnutls_remove_unwanted_ciphersuites(gnutls_session_t session, */ x509_cred = - _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + (gnutls_certificate_credentials_t)_gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); /* if x509_cred==NULL we should remove all X509 ciphersuites */ diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index d91b1c3c5f..7087c60a88 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -127,7 +127,7 @@ int _gnutls_session_cert_type_supported(gnutls_session_t session, gnutls_certificate_credentials_t cred; if (session->security_parameters.entity == GNUTLS_SERVER) { - cred = + cred = (gnutls_certificate_credentials_t) _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index f825237da7..e3e029185c 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -368,7 +368,8 @@ const gnutls_datum_t *gnutls_certificate_get_ours(gnutls_session_t session) CHECK_AUTH(GNUTLS_CRD_CERTIFICATE, NULL); - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL || cred->cert_list == NULL) { gnutls_assert(); return NULL; diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index d9bb024d60..afee05a2f7 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -110,7 +110,8 @@ int _gnutls_x509_cert_verify_peers(gnutls_session_t session, return GNUTLS_E_INVALID_REQUEST; } - cred = _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); + cred = (gnutls_certificate_credentials_t) + _gnutls_get_cred(session->key, GNUTLS_CRD_CERTIFICATE, NULL); if (cred == NULL) { gnutls_assert(); return GNUTLS_E_INSUFFICIENT_CREDENTIALS; diff --git a/lib/x509/pkcs12_bag.c b/lib/x509/pkcs12_bag.c index 33cae02ec3..6c3d3b5164 100644 --- a/lib/x509/pkcs12_bag.c +++ b/lib/x509/pkcs12_bag.c @@ -510,7 +510,7 @@ int gnutls_pkcs12_bag_get_key_id(gnutls_pkcs12_bag_t bag, int indx, * **/ int gnutls_pkcs12_bag_get_friendly_name(gnutls_pkcs12_bag_t bag, int indx, - char **name) + char **name) { if (bag == NULL) { gnutls_assert(); |