diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-05-23 09:26:10 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-05-23 09:26:10 +0200 |
commit | 3e7d0eefc5ede77b03c205f3df498946e4ceb72c (patch) | |
tree | de1aebb4cec3ec198955ddedd23d2809d44e6293 | |
parent | 790ff6f9f1d865e25b7a1bc322be3c81f9e3ba46 (diff) | |
download | gnutls-3e7d0eefc5ede77b03c205f3df498946e4ceb72c.tar.gz |
self-tests: limit compatibility API checks to vectors with plaintext
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r-- | lib/crypto-selftests.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/crypto-selftests.c b/lib/crypto-selftests.c index 924af9ffe6..289ce04847 100644 --- a/lib/crypto-selftests.c +++ b/lib/crypto-selftests.c @@ -586,8 +586,8 @@ static int test_cipher_aead_compat(gnutls_cipher_algorithm_t cipher, } } - /* check inplace encryption */ if (vectors[i].plaintext_size > 0) { + /* check inplace encryption */ gnutls_cipher_set_iv(hd, (void*)vectors[i].iv, vectors[i].iv_size); memcpy(tmp2, vectors[i].plaintext, vectors[i].plaintext_size); @@ -601,9 +601,7 @@ static int test_cipher_aead_compat(gnutls_cipher_algorithm_t cipher, _gnutls_debug_log("compat: %s vector %d in-place encryption failed!\n", gnutls_cipher_get_name(cipher), i); return gnutls_assert_val(GNUTLS_E_SELF_TEST_ERROR); } - } - { /* check decryption with separate buffers */ gnutls_cipher_set_iv(hd, (void*)vectors[i].iv, vectors[i].iv_size); |