summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2003-03-04 18:19:19 +0000
committerMoritz Schulte <mo@g10code.com>2003-03-04 18:19:19 +0000
commitf7ffe2e7411d907d4b607e4eb860f57f254b8299 (patch)
treefc000258771d2f7f8141466f2c8ef9b4f9581a71
parent870a879991f11cf5a99caba14c8394e6c9fd1ca3 (diff)
downloadlibgcrypt-f7ffe2e7411d907d4b607e4eb860f57f254b8299.tar.gz
2003-03-02 Moritz Schulte <moritz@g10code.com>
* basic.c (check_one_cipher): Use gcry_cipher_reset() instead of gcry_cipher_close(), gcry_cipher_open and gcry_cipher_setkey().
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/basic.c15
2 files changed, 6 insertions, 14 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 08c74c58..cc858678 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-02 Moritz Schulte <moritz@g10code.com>
+
+ * basic.c (check_one_cipher): Use gcry_cipher_reset() instead of
+ gcry_cipher_close(), gcry_cipher_open and gcry_cipher_setkey().
+
2003-01-23 Werner Koch <wk@gnupg.org>
* keygen.c: New.
diff --git a/tests/basic.c b/tests/basic.c
index fabe80d2..abbc7ddc 100644
--- a/tests/basic.c
+++ b/tests/basic.c
@@ -210,21 +210,8 @@ check_one_cipher (int algo, int mode, int flags)
return;
}
- gcry_cipher_close (hd);
- hd = gcry_cipher_open (algo, mode, flags);
- if (!hd) {
- fail ("algo %d, mode %d, grcy_open_cipher failed: %s\n",
- algo, mode, gcry_strerror (-1) );
- return;
- }
+ gcry_cipher_reset (hd);
- if (gcry_cipher_setkey (hd, key, keylen)) {
- fail ("algo %d, mode %d, gcry_cipher_setkey[2] failed: %s\n",
- algo, mode, gcry_strerror (-1) );
- gcry_cipher_close (hd);
- return;
- }
-
if ( gcry_cipher_decrypt (hd, in, 16, out, 16)) {
fail ("algo %d, mode %d, gcry_cipher_decrypt failed: %s\n",
algo, mode, gcry_strerror (-1) );