projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed compile warnings under windows
[oweals/gnunet.git]
/
src
/
util
/
test_crypto_rsa.c
diff --git
a/src/util/test_crypto_rsa.c
b/src/util/test_crypto_rsa.c
index e71decca8d2f250d73a8c758b66afb9422df4464..859d476b9a9573bb8db177b266b101962b02a9ef 100644
(file)
--- a/
src/util/test_crypto_rsa.c
+++ b/
src/util/test_crypto_rsa.c
@@
-4,7
+4,7
@@
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version
2
, or (at your
+ by the Free Software Foundation; either version
3
, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
@@
-76,15
+76,15
@@
testEncryptDecrypt ()
if (strncmp (TESTSTRING, result, strlen (TESTSTRING)) != 0)
{
printf ("%s != %.*s - testEncryptDecrypt failed!\n",
if (strncmp (TESTSTRING, result, strlen (TESTSTRING)) != 0)
{
printf ("%s != %.*s - testEncryptDecrypt failed!\n",
- TESTSTRING, MAX_TESTVAL, result);
+ TESTSTRING,
(int)
MAX_TESTVAL, result);
ok++;
continue;
}
}
printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n",
ITER,
ok++;
continue;
}
}
printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n",
ITER,
- (unsigned long long)
GNUNET_TIME_absolute_get_duration (start).
- value, ok);
+ (unsigned long long)
+
GNUNET_TIME_absolute_get_duration (start).
value, ok);
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok == 0)
return GNUNET_OK;
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok == 0)
return GNUNET_OK;
@@
-123,8
+123,8
@@
testEncryptPerformance ()
}
printf ("%d RSA encrypt operations %llu ms (%d failures)\n",
ITER,
}
printf ("%d RSA encrypt operations %llu ms (%d failures)\n",
ITER,
- (unsigned long long)
GNUNET_TIME_absolute_get_duration (start).
- value, ok);
+ (unsigned long long)
+
GNUNET_TIME_absolute_get_duration (start).
value, ok);
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok != 0)
return GNUNET_SYSERR;
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok != 0)
return GNUNET_SYSERR;
@@
-182,8
+182,8
@@
testEncryptDecryptSK ()
}
printf ("%d RSA encrypt/decrypt SK operations %llus (%d failures)\n",
ITER,
}
printf ("%d RSA encrypt/decrypt SK operations %llus (%d failures)\n",
ITER,
- (unsigned long long)
GNUNET_TIME_absolute_get_duration (start).
- value, ok);
+ (unsigned long long)
+
GNUNET_TIME_absolute_get_duration (start).
value, ok);
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok != 0)
return GNUNET_SYSERR;
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok != 0)
return GNUNET_SYSERR;
@@
-227,8
+227,8
@@
testSignVerify ()
continue;
}
if (GNUNET_SYSERR !=
continue;
}
if (GNUNET_SYSERR !=
- GNUNET_CRYPTO_rsa_verify
(GNUNET_SIGNATURE_PURPOSE_TRANSPORT_HELLO,
-
&purp, &sig, &pkey))
+ GNUNET_CRYPTO_rsa_verify
+
(GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN,
&purp, &sig, &pkey))
{
printf ("GNUNET_CRYPTO_rsa_verify failed to fail!\n");
ok = GNUNET_SYSERR;
{
printf ("GNUNET_CRYPTO_rsa_verify failed to fail!\n");
ok = GNUNET_SYSERR;
@@
-237,8
+237,8
@@
testSignVerify ()
}
printf ("%d RSA sign/verify operations %llums\n",
ITER,
}
printf ("%d RSA sign/verify operations %llums\n",
ITER,
- (unsigned long long)
GNUNET_TIME_absolute_get_duration (start).
- value);
+ (unsigned long long)
+
GNUNET_TIME_absolute_get_duration (start).
value);
GNUNET_CRYPTO_rsa_key_free (hostkey);
return ok;
}
GNUNET_CRYPTO_rsa_key_free (hostkey);
return ok;
}
@@
-273,6
+273,7
@@
testSignPerformance ()
}
}
printf ("%d RSA sign operations %llu ms\n", ITER,
}
}
printf ("%d RSA sign operations %llu ms\n", ITER,
+ (unsigned long long)
GNUNET_TIME_absolute_get_duration (start).value);
GNUNET_CRYPTO_rsa_key_free (hostkey);
return ok;
GNUNET_TIME_absolute_get_duration (start).value);
GNUNET_CRYPTO_rsa_key_free (hostkey);
return ok;