summaryrefslogtreecommitdiff
path: root/tests/slow
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-15 16:02:29 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-21 01:05:59 +0100
commit37c8eaecbdaebc62aa4c2e8671fb366d20f9bbe8 (patch)
tree97b62330682aa8a6912d8413088addbf52579c67 /tests/slow
parent99ad4c6b2ab76d386be76daed0c509e62d6334c7 (diff)
downloadgnutls-37c8eaecbdaebc62aa4c2e8671fb366d20f9bbe8.tar.gz
Fixed signed/unsigned warnings.
Dropped opaque type (replaced with uint8_t)
Diffstat (limited to 'tests/slow')
-rw-r--r--tests/slow/cipher-test.c44
1 files changed, 23 insertions, 21 deletions
diff --git a/tests/slow/cipher-test.c b/tests/slow/cipher-test.c
index a41aac0dd8..c39d2d83bc 100644
--- a/tests/slow/cipher-test.c
+++ b/tests/slow/cipher-test.c
@@ -21,9 +21,9 @@ struct aes_gcm_vectors_st
{
const uint8_t *key;
const uint8_t *auth;
- int auth_size;
+ unsigned int auth_size;
const uint8_t *plaintext;
- int plaintext_size;
+ unsigned int plaintext_size;
const uint8_t *iv;
const uint8_t *ciphertext;
const uint8_t *tag;
@@ -31,42 +31,42 @@ struct aes_gcm_vectors_st
struct aes_gcm_vectors_st aes_gcm_vectors[] = {
{
- .key =
+ .key = (void*)
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
.auth = NULL,
.auth_size = 0,
.plaintext = NULL,
.plaintext_size = 0,
.ciphertext = NULL,
- .iv = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- .tag =
+ .iv = (void*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ .tag = (void*)
"\x58\xe2\xfc\xce\xfa\x7e\x30\x61\x36\x7f\x1d\x57\xa4\xe7\x45\x5a"},
{
- .key =
+ .key = (void*)
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
.auth = NULL,
.auth_size = 0,
- .plaintext =
+ .plaintext = (void*)
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
.plaintext_size = 16,
- .ciphertext =
+ .ciphertext = (void*)
"\x03\x88\xda\xce\x60\xb6\xa3\x92\xf3\x28\xc2\xb9\x71\xb2\xfe\x78",
- .iv = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
- .tag =
+ .iv = (void*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+ .tag = (void*)
"\xab\x6e\x47\xd4\x2c\xec\x13\xbd\xf5\x3a\x67\xb2\x12\x57\xbd\xdf"},
{
- .key =
+ .key = (void*)
"\xfe\xff\xe9\x92\x86\x65\x73\x1c\x6d\x6a\x8f\x94\x67\x30\x83\x08",
- .auth =
+ .auth = (void*)
"\xfe\xed\xfa\xce\xde\xad\xbe\xef\xfe\xed\xfa\xce\xde\xad\xbe\xef\xab\xad\xda\xd2",
.auth_size = 20,
- .plaintext =
+ .plaintext = (void*)
"\xd9\x31\x32\x25\xf8\x84\x06\xe5\xa5\x59\x09\xc5\xaf\xf5\x26\x9a\x86\xa7\xa9\x53\x15\x34\xf7\xda\x2e\x4c\x30\x3d\x8a\x31\x8a\x72\x1c\x3c\x0c\x95\x95\x68\x09\x53\x2f\xcf\x0e\x24\x49\xa6\xb5\x25\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57\xba\x63\x7b\x39",
.plaintext_size = 60,
- .ciphertext =
+ .ciphertext = (void*)
"\x42\x83\x1e\xc2\x21\x77\x74\x24\x4b\x72\x21\xb7\x84\xd0\xd4\x9c\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0\x35\xc1\x7e\x23\x29\xac\xa1\x2e\x21\xd5\x14\xb2\x54\x66\x93\x1c\x7d\x8f\x6a\x5a\xac\x84\xaa\x05\x1b\xa3\x0b\x39\x6a\x0a\xac\x97\x3d\x58\xe0\x91",
- .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad\xde\xca\xf8\x88",
- .tag =
+ .iv = (void*)"\xca\xfe\xba\xbe\xfa\xce\xdb\xad\xde\xca\xf8\x88",
+ .tag = (void*)
"\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb\x94\xfa\xe9\x5a\xe7\x12\x1a\x47"}
};
@@ -120,7 +120,8 @@ static int
test_aes (void)
{
gnutls_cipher_hd_t hd;
- int ret, i, j;
+ int ret;
+ unsigned int i, j;
uint8_t _iv[16];
uint8_t tmp[128];
gnutls_datum_t key, iv;
@@ -341,11 +342,11 @@ struct hash_vectors_st
const char *name;
int algorithm;
const uint8_t *key; /* if hmac */
- int key_size;
+ unsigned int key_size;
const uint8_t *plaintext;
- int plaintext_size;
+ unsigned int plaintext_size;
const uint8_t *output;
- int output_size;
+ unsigned int output_size;
} hash_vectors[] =
{
{
@@ -480,7 +481,8 @@ static int
test_hash (void)
{
uint8_t data[HASH_DATA_SIZE];
- int i, j, ret;
+ unsigned int i, j;
+ int ret;
size_t data_size;
fprintf (stdout, "Tests on Hashes\n");