diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-01-15 16:02:29 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-01-21 01:05:59 +0100 |
commit | 37c8eaecbdaebc62aa4c2e8671fb366d20f9bbe8 (patch) | |
tree | 97b62330682aa8a6912d8413088addbf52579c67 /src/certtool-common.c | |
parent | 99ad4c6b2ab76d386be76daed0c509e62d6334c7 (diff) | |
download | gnutls-37c8eaecbdaebc62aa4c2e8671fb366d20f9bbe8.tar.gz |
Fixed signed/unsigned warnings.
Dropped opaque type (replaced with uint8_t)
Diffstat (limited to 'src/certtool-common.c')
-rw-r--r-- | src/certtool-common.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/certtool-common.c b/src/certtool-common.c index 4c65ad26d9..e2fdab9ace 100644 --- a/src/certtool-common.c +++ b/src/certtool-common.c @@ -72,7 +72,7 @@ safe_open_rw (const char *file, int privkey_op) gnutls_datum_t * load_secret_key (int mand, common_info_st * info) { - unsigned char raw_key[64]; + char raw_key[64]; size_t raw_key_size = sizeof (raw_key); static gnutls_datum_t key; gnutls_datum_t hex_key; @@ -88,14 +88,14 @@ load_secret_key (int mand, common_info_st * info) return NULL; } - hex_key.data = (char *) info->secret_key; + hex_key.data = (void *) info->secret_key; hex_key.size = strlen (info->secret_key); ret = gnutls_hex_decode (&hex_key, raw_key, &raw_key_size); if (ret < 0) error (EXIT_FAILURE, 0, "hex_decode: %s", gnutls_strerror (ret)); - key.data = raw_key; + key.data = (void*)raw_key; key.size = raw_key_size; return &key; @@ -280,7 +280,7 @@ load_private_key (int mand, common_info_st * info) return _load_pkcs11_privkey(info->privkey); #endif - dat.data = read_binary_file (info->privkey, &size); + dat.data = (void*)read_binary_file (info->privkey, &size); dat.size = size; if (!dat.data) @@ -314,7 +314,7 @@ load_x509_private_key (int mand, common_info_st * info) if (ret < 0) error (EXIT_FAILURE, 0, "privkey_init: %s", gnutls_strerror (ret)); - dat.data = read_binary_file (info->privkey, &size); + dat.data = (void*)read_binary_file (info->privkey, &size); dat.size = size; if (!dat.data) @@ -396,7 +396,7 @@ load_cert_list (int mand, size_t * crt_size, common_info_st * info) fclose (fd); - ptr = buffer; + ptr = (void*)buffer; ptr_size = size; for (i = 0; i < MAX_CERTS; i++) @@ -405,7 +405,7 @@ load_cert_list (int mand, size_t * crt_size, common_info_st * info) if (ret < 0) error (EXIT_FAILURE, 0, "crt_init: %s", gnutls_strerror (ret)); - dat.data = ptr; + dat.data = (void*)ptr; dat.size = ptr_size; ret = gnutls_x509_crt_import (crt[i], &dat, info->incert_format); @@ -450,7 +450,7 @@ load_request (common_info_st * info) if (ret < 0) error (EXIT_FAILURE, 0, "crq_init: %s", gnutls_strerror (ret)); - dat.data = read_binary_file (info->request, &size); + dat.data = (void*)read_binary_file (info->request, &size); dat.size = size; if (!dat.data) @@ -488,7 +488,7 @@ load_ca_private_key (common_info_st * info) return _load_pkcs11_privkey(info->ca_privkey); #endif - dat.data = read_binary_file (info->ca_privkey, &size); + dat.data = (void*)read_binary_file (info->ca_privkey, &size); dat.size = size; if (!dat.data) @@ -519,7 +519,7 @@ load_ca_cert (common_info_st * info) if (ret < 0) error (EXIT_FAILURE, 0, "crt_init: %s", gnutls_strerror (ret)); - dat.data = read_binary_file (info->ca, &size); + dat.data = (void*)read_binary_file (info->ca, &size); dat.size = size; if (!dat.data) @@ -561,7 +561,7 @@ load_pubkey (int mand, common_info_st * info) if (ret < 0) error (EXIT_FAILURE, 0, "privkey_init: %s", gnutls_strerror (ret)); - dat.data = read_binary_file (info->pubkey, &size); + dat.data = (void*)read_binary_file (info->pubkey, &size); dat.size = size; if (!dat.data) |