summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog8
-rw-r--r--tests/basic.c38
2 files changed, 26 insertions, 20 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 32d2ae68..0766e70a 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-18 Werner Koch <wk@gnupg.org>
+
+ * basic.c (check_cbc_mac_cipher): Adjusted for new API of get_blklen
+ and get_keylen.
+ (check_ctr_cipher): Ditto.
+ (check_one_cipher): Ditto.
+ (check_one_md): Adjusted for new API of gcry_md_copy.
+
2003-06-18 Moritz Schulte <moritz@g10code.com>
* register.c: Replace old type GcryModule with newer one:
diff --git a/tests/basic.c b/tests/basic.c
index ba1a4549..10a6404a 100644
--- a/tests/basic.c
+++ b/tests/basic.c
@@ -122,20 +122,20 @@ check_cbc_mac_cipher (void)
return;
}
- err = gcry_cipher_get_algo_blklen (tv[i].algo, &blklen);
- if (err)
+ blklen = gcry_cipher_get_algo_blklen(tv[i].algo);
+ if (!blklen)
{
- fail ("cbc-mac algo %d, gcry_cipher_get_algo_blklen failed: %s\n",
- tv[i].algo, gpg_strerror (err));
+ fail ("cbc-mac algo %d, gcry_cipher_get_algo_blklen failed\n",
+ tv[i].algo);
gcry_cipher_close (hd);
return;
}
- err = gcry_cipher_get_algo_keylen (tv[i].algo, &keylen);
- if (err)
+ keylen = gcry_cipher_get_algo_keylen (tv[i].algo);
+ if (!keylen)
{
- fail ("cbc-mac algo %d, gcry_cipher_get_algo_keylen failed: %s\n",
- tv[i].algo, gpg_strerror (err));
+ fail ("cbc-mac algo %d, gcry_cipher_get_algo_keylen failed\n",
+ tv[i].algo);
return;
}
@@ -381,11 +381,10 @@ check_ctr_cipher (void)
return;
}
- err = gcry_cipher_get_algo_keylen (tv[i].algo, &keylen);
- if (err)
+ keylen = gcry_cipher_get_algo_keylen(tv[i].algo);
+ if (!keylen)
{
- fail ("aes-ctr, gcry_cipher_get_algo_keylen failed: %s\n",
- gpg_strerror (err));
+ fail ("aes-ctr, gcry_cipher_get_algo_keylen failed\n");
return;
}
@@ -401,11 +400,10 @@ check_ctr_cipher (void)
return;
}
- err = gcry_cipher_get_algo_blklen (tv[i].algo, &blklen);
- if (err)
+ blklen = gcry_cipher_get_algo_blklen(tv[i].algo);
+ if (!blklen)
{
- fail ("aes-ctr, gcry_cipher_get_algo_blklen failed: %s\n",
- gpg_strerror (err));
+ fail ("aes-ctr, gcry_cipher_get_algo_blklen failed\n");
return;
}
@@ -469,11 +467,11 @@ check_one_cipher (int algo, int mode, int flags)
memcpy (plain, "foobar42FOOBAR17", 16);
gpg_error_t err = 0;
- err = gcry_cipher_get_algo_keylen (algo, &keylen);
- if (err)
+ keylen = gcry_cipher_get_algo_keylen (algo);
+ if (!keylen)
{
- fail ("algo %d, mode %d, gcry_cipher_get_algo_keylen failed: %s\n",
- algo, mode, gpg_strerror (err));
+ fail ("algo %d, mode %d, gcry_cipher_get_algo_keylen failed\n",
+ algo, mode);
return;
}