summaryrefslogtreecommitdiff
path: root/tests/cipher-test.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-04-12 13:44:51 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-04-12 13:46:11 +0200
commit23106912a0ef0dd9a76b0855dc4a3491f45fc5cd (patch)
tree84a237f6bd6da6fd45425698b88bcb1ad0a635d8 /tests/cipher-test.c
parent0bb26a6e8e9bd7ee23884f17342c8e84033907cf (diff)
downloadgnutls-23106912a0ef0dd9a76b0855dc4a3491f45fc5cd.tar.gz
Updates in the AES-NI accelerator.
Diffstat (limited to 'tests/cipher-test.c')
-rw-r--r--tests/cipher-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/cipher-test.c b/tests/cipher-test.c
index 1bce21b1ef..d9ae400ad7 100644
--- a/tests/cipher-test.c
+++ b/tests/cipher-test.c
@@ -79,6 +79,7 @@ static int test_aes(void)
fprintf(stdout, "Tests on AES Encryption: ");
for (i = 0; i < sizeof(aes_vectors) / sizeof(aes_vectors[0]); i++) {
memset(_iv, 0, sizeof(_iv));
+ memset(tmp, 0, sizeof(tmp));
key.data = (void*)aes_vectors[i].key;
key.size = 16;
@@ -123,6 +124,7 @@ static int test_aes(void)
for (i = 0; i < sizeof(aes_vectors) / sizeof(aes_vectors[0]); i++) {
memset(_iv, 0, sizeof(_iv));
+ memset(tmp, 0x33, sizeof(tmp));
key.data = (void*)aes_vectors[i].key;
key.size = 16;
@@ -316,11 +318,14 @@ static int test_hash(void)
int main(int argc, char** argv)
{
+ gnutls_global_init();
+
if (test_aes())
return 1;
if (test_hash())
return 1;
+ gnutls_global_deinit();
return 0;
}