From b138a64f7d0dc121642757c1f020294c36f18eab Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 23 May 2017 09:26:10 +0200 Subject: self-tests: limit compatibility API checks to vectors with plaintext Signed-off-by: Nikos Mavrogiannopoulos --- lib/crypto-selftests.c | 4 +--- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.1