summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-05-23 09:26:10 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-05-23 09:26:40 +0200
commitb138a64f7d0dc121642757c1f020294c36f18eab (patch)
treeb0fc6ab9ed41e120cb3ccc1153f6b186596aeb9d
parent589dad9a420c4ae33e8893c43d13bae1f49a8b4e (diff)
downloadgnutls-b138a64f7d0dc121642757c1f020294c36f18eab.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.c4
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);