diff options
author | Simon Josefsson <simon@josefsson.org> | 2005-12-09 11:51:49 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2005-12-09 11:51:49 +0000 |
commit | 94c0e556dc73a94a3c61d305a18b73564f6443e0 (patch) | |
tree | 8e02cd259e240c600375f37b28154fdb82085be4 | |
parent | c7c6ff3912eed3490fc8f8fd897e9d95ed35c07c (diff) | |
download | gnutls-94c0e556dc73a94a3c61d305a18b73564f6443e0.tar.gz |
Replace "uint" with "unsigned". Remove unused "sint".
-rw-r--r-- | lib/auth_cert.c | 20 | ||||
-rw-r--r-- | lib/auth_cert.h | 8 | ||||
-rw-r--r-- | lib/auth_psk_passwd.c | 2 | ||||
-rw-r--r-- | lib/auth_srp_passwd.c | 4 | ||||
-rw-r--r-- | lib/auth_srp_sb64.c | 4 | ||||
-rw-r--r-- | lib/defines.h | 5 | ||||
-rw-r--r-- | lib/ext_cert_type.c | 2 | ||||
-rw-r--r-- | lib/ext_server_name.c | 2 | ||||
-rw-r--r-- | lib/ext_srp.c | 2 | ||||
-rw-r--r-- | lib/gnutls_buffers.c | 6 | ||||
-rw-r--r-- | lib/gnutls_cert.c | 4 | ||||
-rw-r--r-- | lib/gnutls_dh.h | 2 | ||||
-rw-r--r-- | lib/gnutls_dh_primes.c | 2 | ||||
-rw-r--r-- | lib/gnutls_int.h | 4 | ||||
-rw-r--r-- | lib/gnutls_pk.c | 8 | ||||
-rw-r--r-- | lib/gnutls_pk.h | 6 | ||||
-rw-r--r-- | lib/gnutls_state.c | 6 | ||||
-rw-r--r-- | lib/gnutls_state.h | 2 | ||||
-rw-r--r-- | lib/gnutls_ui.c | 2 | ||||
-rw-r--r-- | lib/gnutls_x509.c | 22 | ||||
-rw-r--r-- | lib/x509/common.c | 2 | ||||
-rw-r--r-- | lib/x509/dn.c | 4 | ||||
-rw-r--r-- | lib/x509/extensions.c | 2 | ||||
-rw-r--r-- | lib/x509/pkcs7.c | 4 | ||||
-rw-r--r-- | lib/x509/privkey_pkcs8.c | 2 | ||||
-rw-r--r-- | lib/x509_b64.c | 4 |
26 files changed, 63 insertions, 68 deletions
diff --git a/lib/auth_cert.c b/lib/auth_cert.c index eac86abc5c..7acfdef95c 100644 --- a/lib/auth_cert.c +++ b/lib/auth_cert.c @@ -47,7 +47,7 @@ #include "debug.h" static gnutls_cert *alloc_and_load_x509_certs (gnutls_x509_crt_t * certs, - uint); + unsigned); static gnutls_privkey *alloc_and_load_x509_key (gnutls_x509_privkey_t key); static gnutls_cert *alloc_and_load_pgp_certs (gnutls_openpgp_key_t cert); static gnutls_privkey *alloc_and_load_pgp_key (const gnutls_openpgp_privkey_t @@ -192,11 +192,11 @@ _find_x509_cert (const gnutls_certificate_credentials_t cred, const gnutls_pk_algorithm_t * pk_algos, int pk_algos_length, int *indx) { - uint size; + unsigned size; gnutls_datum_t odn; opaque *data = _data; ssize_t data_size = _data_size; - uint i, j; + unsigned i, j; int result, cert_pk; *indx = -1; @@ -262,7 +262,7 @@ _find_openpgp_cert (const gnutls_certificate_credentials_t cred, gnutls_pk_algorithm_t * pk_algos, int pk_algos_length, int *indx) { - uint i, j; + unsigned i, j; *indx = -1; @@ -297,7 +297,7 @@ static int get_issuers_num (gnutls_session_t session, opaque * data, ssize_t data_size) { int issuers_dn_len = 0, result; - uint size; + unsigned size; /* Count the number of the given issuers; * This is used to allocate the issuers_dn without @@ -348,7 +348,7 @@ get_issuers (gnutls_session_t session, opaque * data, size_t data_size) { int i; - uint size; + unsigned size; if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) return 0; @@ -393,7 +393,7 @@ call_get_cert_callback (gnutls_session_t session, int issuers_dn_length, gnutls_pk_algorithm_t * pk_algos, int pk_algos_length) { - uint i; + unsigned i; gnutls_cert *local_certs = NULL; gnutls_privkey *local_key = NULL; gnutls_retr_st st; @@ -1488,11 +1488,11 @@ _gnutls_get_selected_cert (gnutls_session_t session, * space for them. */ static gnutls_cert * -alloc_and_load_x509_certs (gnutls_x509_crt_t * certs, uint ncerts) +alloc_and_load_x509_certs (gnutls_x509_crt_t * certs, unsigned ncerts) { gnutls_cert *local_certs; int ret = 0; - uint i, j; + unsigned i, j; if (certs == NULL) return NULL; @@ -1686,7 +1686,7 @@ int _gnutls_server_select_cert (gnutls_session_t session, gnutls_pk_algorithm_t requested_algo) { - uint i; + unsigned i; int idx, ret; gnutls_certificate_credentials_t cred; diff --git a/lib/auth_cert.h b/lib/auth_cert.h index 86a8600149..ba082233f7 100644 --- a/lib/auth_cert.h +++ b/lib/auth_cert.h @@ -48,11 +48,11 @@ typedef struct gnutls_certificate_credentials_st * (if more than one, one certificate certifies the one before) * [1] certificate2, certificate22, ... */ - uint *cert_list_length; + unsigned *cert_list_length; /* contains the number of the certificates in a * row (should be 1 for OpenPGP keys). */ - uint ncerts; /* contains the number of columns in cert_list. + unsigned ncerts; /* contains the number of columns in cert_list. * This is the same with the number of pkeys. */ @@ -73,11 +73,11 @@ typedef struct gnutls_certificate_credentials_st /* X509 specific stuff */ gnutls_x509_crt_t *x509_ca_list; - uint x509_ncas; /* number of CAs in the ca_list + unsigned x509_ncas; /* number of CAs in the ca_list */ gnutls_x509_crl_t *x509_crl_list; - uint x509_ncrls; /* number of CRLs in the crl_list + unsigned x509_ncrls; /* number of CRLs in the crl_list */ unsigned int verify_flags; /* flags to be used at diff --git a/lib/auth_psk_passwd.c b/lib/auth_psk_passwd.c index 237a1d015e..6bb523113e 100644 --- a/lib/auth_psk_passwd.c +++ b/lib/auth_psk_passwd.c @@ -122,7 +122,7 @@ _gnutls_psk_pwd_find_entry (gnutls_session_t session, char *username, gnutls_psk_server_credentials_t cred; FILE *fd; char line[2 * 1024]; - uint i, len; + unsigned i, len; int ret; cred = (gnutls_psk_server_credentials_t) diff --git a/lib/auth_srp_passwd.c b/lib/auth_srp_passwd.c index 35be3f8a73..0f8fc552ac 100644 --- a/lib/auth_srp_passwd.c +++ b/lib/auth_srp_passwd.c @@ -207,7 +207,7 @@ pwd_read_conf (const char *pconf_file, SRP_PWD_ENTRY * entry, int idx) { FILE *fd; char line[2 * 1024]; - uint i, len; + unsigned i, len; char indexstr[10]; sprintf (indexstr, "%d", idx); /* Flawfinder: ignore */ @@ -249,7 +249,7 @@ _gnutls_srp_pwd_read_entry (gnutls_session_t state, char *username, gnutls_srp_server_credentials_t cred; FILE *fd; char line[2 * 1024]; - uint i, len; + unsigned i, len; int ret; int idx, last_idx; SRP_PWD_ENTRY *entry; diff --git a/lib/auth_srp_sb64.c b/lib/auth_srp_sb64.c index fabc499632..488c243f02 100644 --- a/lib/auth_srp_sb64.c +++ b/lib/auth_srp_sb64.c @@ -150,7 +150,7 @@ encode (uint8_t * result, const uint8_t * rdata, int left) int _gnutls_sbase64_encode (uint8_t * data, size_t data_size, uint8_t ** result) { - uint i, j; + unsigned i, j; int ret, tmp; opaque tmpres[4]; int mod = data_size % 3; @@ -251,7 +251,7 @@ decode (uint8_t * result, const uint8_t * data) int _gnutls_sbase64_decode (uint8_t * data, size_t idata_size, uint8_t ** result) { - uint i, j; + unsigned i, j; int ret, left; int data_size, tmp; uint8_t datrev[4]; diff --git a/lib/defines.h b/lib/defines.h index 64c65aa14d..925d10c982 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -74,11 +74,6 @@ typedef int ssize_t; #include "memmem.h" -#ifndef HAVE_UINT -typedef unsigned int uint; -typedef signed int sint; -#endif - #define SIZEOF_UNSIGNED_LONG_INT SIZEOF_UNSIGNED_LONG /* some systems had problems with long long int, thus, diff --git a/lib/ext_cert_type.c b/lib/ext_cert_type.c index cb615a7704..b131fe3473 100644 --- a/lib/ext_cert_type.c +++ b/lib/ext_cert_type.c @@ -144,7 +144,7 @@ int _gnutls_cert_type_send_params (gnutls_session_t session, opaque * data, size_t data_size) { - uint len, i; + unsigned len, i; /* this function sends the client extension data (dnsname) */ if (session->security_parameters.entity == GNUTLS_CLIENT) diff --git a/lib/ext_server_name.c b/lib/ext_server_name.c index 84945d6eaa..f9ca429a80 100644 --- a/lib/ext_server_name.c +++ b/lib/ext_server_name.c @@ -129,7 +129,7 @@ _gnutls_server_name_send_params (gnutls_session_t session, { uint16_t len; opaque *p; - uint i; + unsigned i; ssize_t data_size = _data_size; int total_size = 0; diff --git a/lib/ext_srp.c b/lib/ext_srp.c index 8e0cd51980..e8bd84e0c1 100644 --- a/lib/ext_srp.c +++ b/lib/ext_srp.c @@ -77,7 +77,7 @@ int _gnutls_srp_send_params (gnutls_session_t session, opaque * data, size_t data_size) { - uint len; + unsigned len; if (_gnutls_kx_priority (session, GNUTLS_KX_SRP) < 0 && _gnutls_kx_priority (session, GNUTLS_KX_SRP_DSS) < 0 && diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c index a883357dfd..2923232cac 100644 --- a/lib/gnutls_buffers.c +++ b/lib/gnutls_buffers.c @@ -233,7 +233,7 @@ _gnutls_read (gnutls_session_t session, void *iptr, size_t left; ssize_t i = 0; char *ptr = iptr; - uint j, x, sum = 0; + unsigned j, x, sum = 0; gnutls_transport_ptr_t fd = session->internals.transport_recv_ptr; session->internals.direction = 0; @@ -632,7 +632,7 @@ _gnutls_io_write_buffered (gnutls_session_t session, const void *iptr, size_t n) { size_t left; - uint j, x, sum = 0; + unsigned j, x, sum = 0; ssize_t retval, i; const opaque *ptr; int ret; @@ -725,7 +725,7 @@ _gnutls_io_write_buffered (gnutls_session_t session, _gnutls_write_log ("WRITE: wrote %d bytes to %d. Left %d bytes. Total %d bytes.\n", i, fd, left, n); - for (x = 0; x < (uint) ((i) / 16) + 1; x++) + for (x = 0; x < (unsigned) ((i) / 16) + 1; x++) { line[0] = 0; diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c index 42c5abab08..45bb53ab0a 100644 --- a/lib/gnutls_cert.c +++ b/lib/gnutls_cert.c @@ -57,7 +57,7 @@ void gnutls_certificate_free_keys (gnutls_certificate_credentials_t sc) { - uint i, j; + unsigned i, j; for (i = 0; i < sc->ncerts; i++) { @@ -99,7 +99,7 @@ gnutls_certificate_free_keys (gnutls_certificate_credentials_t sc) void gnutls_certificate_free_cas (gnutls_certificate_credentials_t sc) { - uint j; + unsigned j; for (j = 0; j < sc->x509_ncas; j++) { diff --git a/lib/gnutls_dh.h b/lib/gnutls_dh.h index e27e8f0f7a..f6fea3fe5f 100644 --- a/lib/gnutls_dh.h +++ b/lib/gnutls_dh.h @@ -28,7 +28,7 @@ const mpi_t *_gnutls_dh_params_to_mpi (gnutls_dh_params_t); mpi_t gnutls_calc_dh_secret (mpi_t * ret_x, mpi_t g, mpi_t prime); mpi_t gnutls_calc_dh_key (mpi_t f, mpi_t x, mpi_t prime); -int _gnutls_dh_generate_prime (mpi_t * ret_g, mpi_t * ret_n, uint bits); +int _gnutls_dh_generate_prime (mpi_t * ret_g, mpi_t * ret_n, unsigned bits); gnutls_dh_params_t _gnutls_get_dh_params (gnutls_dh_params_t dh_params, gnutls_params_function* func, diff --git a/lib/gnutls_dh_primes.c b/lib/gnutls_dh_primes.c index d9289a66a3..5f311c72ef 100644 --- a/lib/gnutls_dh_primes.c +++ b/lib/gnutls_dh_primes.c @@ -547,7 +547,7 @@ gnutls_dh_params_export_pkcs3 (gnutls_dh_params_t params, return GNUTLS_E_INTERNAL_ERROR; } - if ((uint) result + 1 > *params_data_size) + if ((unsigned) result + 1 > *params_data_size) { gnutls_assert (); gnutls_free (out); diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index 8651777dff..6d560bcc60 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -246,7 +246,7 @@ typedef struct typedef struct { opaque name[MAX_SERVER_NAME_SIZE]; - uint name_length; + unsigned name_length; gnutls_server_name_type_t type; } server_name_st; @@ -256,7 +256,7 @@ typedef struct { server_name_st server_names[MAX_SERVER_NAME_EXTENSIONS]; /* limit server_name extensions */ - uint server_names_size; + unsigned server_names_size; opaque srp_username[MAX_SRP_USERNAME + 1]; } tls_ext_st; diff --git a/lib/gnutls_pk.c b/lib/gnutls_pk.c index 8dfc8e38ea..020e64c0e7 100644 --- a/lib/gnutls_pk.c +++ b/lib/gnutls_pk.c @@ -54,7 +54,7 @@ static int _gnutls_pk_decrypt (int algo, mpi_t * resarr, mpi_t data, int _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext, const gnutls_datum_t * plaintext, - mpi_t * params, uint params_len, uint btype) + mpi_t * params, unsigned params_len, unsigned btype) { unsigned int i, pad; int ret; @@ -207,9 +207,9 @@ _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext, int _gnutls_pkcs1_rsa_decrypt (gnutls_datum_t * plaintext, const gnutls_datum_t * ciphertext, - mpi_t * params, uint params_len, uint btype) + mpi_t * params, unsigned params_len, unsigned btype) { - uint k, i; + unsigned k, i; int ret; mpi_t c, res; opaque *edata; @@ -425,7 +425,7 @@ encode_ber_rs (gnutls_datum_t * sig_value, mpi_t r, mpi_t s) int _gnutls_dsa_sign (gnutls_datum_t * signature, const gnutls_datum_t * hash, mpi_t * params, - uint params_len) + unsigned params_len) { mpi_t rs[2], mdata; int ret; diff --git a/lib/gnutls_pk.h b/lib/gnutls_pk.h index 1494fc64d4..422d0079b5 100644 --- a/lib/gnutls_pk.h +++ b/lib/gnutls_pk.h @@ -27,13 +27,13 @@ int _gnutls_pkcs1_rsa_encrypt (gnutls_datum_t * ciphertext, const gnutls_datum_t * plaintext, - mpi_t * params, uint params_len, uint btype); + mpi_t * params, unsigned params_len, unsigned btype); int _gnutls_dsa_sign (gnutls_datum_t * signature, const gnutls_datum_t * plaintext, mpi_t * params, - uint params_len); + unsigned params_len); int _gnutls_pkcs1_rsa_decrypt (gnutls_datum_t * plaintext, const gnutls_datum_t * ciphertext, - mpi_t * params, uint params_len, uint btype); + mpi_t * params, unsigned params_len, unsigned btype); int _gnutls_rsa_verify (const gnutls_datum_t * vdata, const gnutls_datum_t * ciphertext, mpi_t * params, int params_len, int btype); diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index 4f46da691b..7e270132fb 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -127,8 +127,8 @@ int _gnutls_session_cert_type_supported (gnutls_session_t session, gnutls_certificate_type_t cert_type) { - uint i; - uint cert_found = 0; + unsigned i; + unsigned cert_found = 0; gnutls_certificate_credentials_t cred; if (session->security_parameters.entity == GNUTLS_SERVER) @@ -481,7 +481,7 @@ _gnutls_dh_set_peer_public (gnutls_session_t session, mpi_t public) } int -_gnutls_dh_set_secret_bits (gnutls_session_t session, uint bits) +_gnutls_dh_set_secret_bits (gnutls_session_t session, unsigned bits) { switch (gnutls_auth_get_type (session)) { diff --git a/lib/gnutls_state.h b/lib/gnutls_state.h index 633fccfc84..00bd1c656a 100644 --- a/lib/gnutls_state.h +++ b/lib/gnutls_state.h @@ -45,7 +45,7 @@ gnutls_certificate_type_t gnutls_certificate_type_get (gnutls_session_t); int _gnutls_session_cert_type_supported (gnutls_session_t, gnutls_certificate_type_t); -int _gnutls_dh_set_secret_bits (gnutls_session_t session, uint bits); +int _gnutls_dh_set_secret_bits (gnutls_session_t session, unsigned bits); int _gnutls_dh_set_peer_public (gnutls_session_t session, mpi_t public); int _gnutls_dh_set_group (gnutls_session_t session, mpi_t gen, mpi_t prime); diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index e0250f126d..8c4a14bdac 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -537,7 +537,7 @@ gnutls_fingerprint (gnutls_digest_algorithm_t algo, GNUTLS_HASH_HANDLE td; int hash_len = _gnutls_hash_get_algo_len (HASH2MAC (algo)); - if (hash_len < 0 || (uint) hash_len > *result_size || result == NULL) + if (hash_len < 0 || (unsigned) hash_len > *result_size || result == NULL) { *result_size = hash_len; return GNUTLS_E_SHORT_MEMORY_BUFFER; diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index 35d5c94574..1f4725820c 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -207,7 +207,7 @@ _gnutls_check_key_cert_match (gnutls_certificate_credentials_t res) { gnutls_datum_t cid; gnutls_datum_t kid; - uint pk = res->cert_list[res->ncerts - 1][0].subject_pk_algorithm; + unsigned pk = res->cert_list[res->ncerts - 1][0].subject_pk_algorithm; if (res->pkey[res->ncerts - 1].pk_algorithm != pk) { @@ -266,7 +266,7 @@ _gnutls_check_key_cert_match (gnutls_certificate_credentials_t res) * returns the number of certificates parsed (1) */ static int -parse_crt_mem (gnutls_cert ** cert_list, uint * ncerts, +parse_crt_mem (gnutls_cert ** cert_list, unsigned * ncerts, gnutls_x509_crt_t cert) { int i; @@ -301,7 +301,7 @@ parse_crt_mem (gnutls_cert ** cert_list, uint * ncerts, * returns the number of certificates parsed (1) */ static int -parse_der_cert_mem (gnutls_cert ** cert_list, uint * ncerts, +parse_der_cert_mem (gnutls_cert ** cert_list, unsigned * ncerts, const void *input_cert, int input_cert_size) { gnutls_datum_t tmp; @@ -340,7 +340,7 @@ parse_der_cert_mem (gnutls_cert ** cert_list, uint * ncerts, * returns the number of certificate parsed */ static int -parse_pkcs7_cert_mem (gnutls_cert ** cert_list, uint * ncerts, const +parse_pkcs7_cert_mem (gnutls_cert ** cert_list, unsigned * ncerts, const void *input_cert, int input_cert_size, int flags) { #ifdef ENABLE_PKI @@ -463,7 +463,7 @@ parse_pkcs7_cert_mem (gnutls_cert ** cert_list, uint * ncerts, const * a gnutls_cert structure. Returns the number of certificate parsed. */ static int -parse_pem_cert_mem (gnutls_cert ** cert_list, uint * ncerts, +parse_pem_cert_mem (gnutls_cert ** cert_list, unsigned * ncerts, const char *input_cert, int input_cert_size) { int size, siz2, i; @@ -1092,7 +1092,7 @@ generate_rdn_seq (gnutls_certificate_credentials_t res) { gnutls_datum_t tmp; int ret; - uint size, i; + unsigned size, i; opaque *pdata; /* Generate the RDN sequence @@ -1214,7 +1214,7 @@ _gnutls_check_key_usage (const gnutls_cert * cert, gnutls_kx_algorithm_t alg) static int -parse_pem_ca_mem (gnutls_x509_crt_t ** cert_list, uint * ncerts, +parse_pem_ca_mem (gnutls_x509_crt_t ** cert_list, unsigned * ncerts, const opaque * input_cert, int input_cert_size) { int i, size; @@ -1312,7 +1312,7 @@ parse_pem_ca_mem (gnutls_x509_crt_t ** cert_list, uint * ncerts, * returns the number of certificates parsed (1) */ static int -parse_der_ca_mem (gnutls_x509_crt_t ** cert_list, uint * ncerts, +parse_der_ca_mem (gnutls_x509_crt_t ** cert_list, unsigned * ncerts, const void *input_cert, int input_cert_size) { int i; @@ -1516,7 +1516,7 @@ gnutls_certificate_set_x509_trust_file (gnutls_certificate_credentials_t #ifdef ENABLE_PKI static int -parse_pem_crl_mem (gnutls_x509_crl_t ** crl_list, uint * ncrls, +parse_pem_crl_mem (gnutls_x509_crl_t ** crl_list, unsigned * ncrls, const opaque * input_crl, int input_crl_size) { int size, i; @@ -1601,7 +1601,7 @@ parse_pem_crl_mem (gnutls_x509_crl_t ** crl_list, uint * ncrls, * returns the number of certificates parsed (1) */ static int -parse_der_crl_mem (gnutls_x509_crl_t ** crl_list, uint * ncrls, +parse_der_crl_mem (gnutls_x509_crl_t ** crl_list, unsigned * ncrls, const void *input_crl, int input_crl_size) { int i; @@ -2095,7 +2095,7 @@ gnutls_certificate_set_x509_simple_pkcs12_file (gnutls_certificate_credentials_t void gnutls_certificate_free_crls (gnutls_certificate_credentials_t sc) { - uint j; + unsigned j; for (j = 0; j < sc->x509_ncrls; j++) { diff --git a/lib/x509/common.c b/lib/x509/common.c index c361e79b3f..18bf475624 100644 --- a/lib/x509/common.c +++ b/lib/x509/common.c @@ -791,7 +791,7 @@ _gnutls_x509_export_int (ASN1_TYPE asn1_data, return GNUTLS_E_INTERNAL_ERROR; } - if ((uint) result > *output_data_size) + if ((unsigned) result > *output_data_size) { gnutls_assert (); gnutls_free (out); diff --git a/lib/x509/dn.c b/lib/x509/dn.c index 819e369900..9020b81713 100644 --- a/lib/x509/dn.c +++ b/lib/x509/dn.c @@ -460,7 +460,7 @@ _gnutls_x509_parse_dn_oid (ASN1_TYPE asn1_struct, if (raw_flag != 0) { - if ((uint) len > *sizeof_buf) + if ((unsigned) len > *sizeof_buf) { *sizeof_buf = len; result = GNUTLS_E_SHORT_MEMORY_BUFFER; @@ -617,7 +617,7 @@ _gnutls_x509_get_dn_oid (ASN1_TYPE asn1_struct, len = strlen (oid) + 1; - if (*sizeof_oid < (uint) len) + if (*sizeof_oid < (unsigned) len) { *sizeof_oid = len; gnutls_assert (); diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c index b7d9bb0c4c..461d7152f5 100644 --- a/lib/x509/extensions.c +++ b/lib/x509/extensions.c @@ -232,7 +232,7 @@ _gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, { len = strlen (extnID) + 1; - if (*sizeof_oid < (uint) len) + if (*sizeof_oid < (unsigned) len) { *sizeof_oid = len; gnutls_assert (); diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c index 2081e4cb72..fe7823bb31 100644 --- a/lib/x509/pkcs7.c +++ b/lib/x509/pkcs7.c @@ -341,7 +341,7 @@ gnutls_pkcs7_get_crt_raw (gnutls_pkcs7_t pkcs7, end = end - start + 1; - if ((uint) end > *certificate_size) + if ((unsigned) end > *certificate_size) { *certificate_size = end; result = GNUTLS_E_SHORT_MEMORY_BUFFER; @@ -785,7 +785,7 @@ gnutls_pkcs7_get_crl_raw (gnutls_pkcs7_t pkcs7, end = end - start + 1; - if ((uint) end > *crl_size) + if ((unsigned) end > *crl_size) { *crl_size = end; result = GNUTLS_E_SHORT_MEMORY_BUFFER; diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c index 90158670f3..e3cd9d7067 100644 --- a/lib/x509/privkey_pkcs8.c +++ b/lib/x509/privkey_pkcs8.c @@ -1596,7 +1596,7 @@ generate_key (schema_id schema, if (schema == PBES2) kdf_params->salt_size = - MIN (sizeof (kdf_params->salt), (uint) (10 + (rnd[1] % 10))); + MIN (sizeof (kdf_params->salt), (unsigned) (10 + (rnd[1] % 10))); else kdf_params->salt_size = 8; diff --git a/lib/x509_b64.c b/lib/x509_b64.c index 326c0a28d0..d4313170ce 100644 --- a/lib/x509_b64.c +++ b/lib/x509_b64.c @@ -311,7 +311,7 @@ gnutls_pem_base64_encode (const char *msg, const gnutls_datum_t * data, if (size < 0) return size; - if (result == NULL || *result_size < (uint) size) + if (result == NULL || *result_size < (unsigned) size) { gnutls_free (ret); *result_size = size; @@ -544,7 +544,7 @@ gnutls_pem_base64_decode (const char *header, if (size < 0) return size; - if (result == NULL || *result_size < (uint) size) + if (result == NULL || *result_size < (unsigned) size) { gnutls_free (ret); *result_size = size; |