summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-21 09:12:42 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-21 09:12:42 +0100
commit2d3a7b8f20fcc912ea81125f9af370cddbb82b62 (patch)
tree2c482db8d8d1645d1253544d0e0c144b350a50c1 /tests
parentf9ae61d13e0915a303b6a69c8729bc6fc7b44088 (diff)
downloadgnutls-2d3a7b8f20fcc912ea81125f9af370cddbb82b62.tar.gz
added (dead) code to test the _hmac_fast.
Diffstat (limited to 'tests')
-rw-r--r--tests/slow/cipher-test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/slow/cipher-test.c b/tests/slow/cipher-test.c
index c39d2d83bc..c51a3a4288 100644
--- a/tests/slow/cipher-test.c
+++ b/tests/slow/cipher-test.c
@@ -493,7 +493,18 @@ test_hash (void)
/* import key */
if (hash_vectors[i].key != NULL)
{
+#if 0
+ ret = gnutls_hmac_fast(hash_vectors[i].algorithm, hash_vectors[i].key, hash_vectors[i].key_size,
+ hash_vectors[i].plaintext, hash_vectors[i].plaintext_size, data);
+ if (ret < 0)
+ {
+ fprintf (stderr, "Error: %s:%d\n", __func__,
+ __LINE__);
+ return 1;
+ }
+#else
gnutls_hmac_hd_t hd;
+
ret = gnutls_hmac_init( &hd, hash_vectors[i].algorithm, hash_vectors[i].key, hash_vectors[i].key_size);
if (ret < 0)
{
@@ -520,6 +531,7 @@ test_hash (void)
gnutls_hmac_output(hd, data);
gnutls_hmac_deinit(hd, NULL);
+#endif
data_size =
gnutls_hmac_get_len (hash_vectors[i].algorithm);