From 66dfc5a68934ca3d2b6dd6f3dc40a8cde11419e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Sat, 29 Mar 2014 16:10:55 +0100 Subject: [PATCH] Add test for cipher_list() --- tests/suites/test_suite_cipher.function | 10 ++++++++++ tests/suites/test_suite_cipher.padding.data | 3 +++ 2 files changed, 13 insertions(+) diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function index b8f1df3d9..c39da5b3f 100644 --- a/tests/suites/test_suite_cipher.function +++ b/tests/suites/test_suite_cipher.function @@ -11,6 +11,16 @@ * END_DEPENDENCIES */ +/* BEGIN_CASE */ +void cipher_list( ) +{ + const int *cipher_type; + + for( cipher_type = cipher_list(); *cipher_type != 0; cipher_type++ ) + TEST_ASSERT( cipher_info_from_type( *cipher_type ) != NULL ); +} +/* END_CASE */ + /* BEGIN_CASE */ void enc_dec_buf( int cipher_id, char *cipher_string, int key_len, int length_val, int pad_mode ) diff --git a/tests/suites/test_suite_cipher.padding.data b/tests/suites/test_suite_cipher.padding.data index 8776a2852..702c88ff7 100644 --- a/tests/suites/test_suite_cipher.padding.data +++ b/tests/suites/test_suite_cipher.padding.data @@ -1,3 +1,6 @@ +Cipher list +cipher_list: + Set padding with AES-CBC depends_on:POLARSSL_AES_C:POLARSSL_CIPHER_MODE_CBC:POLARSSL_CIPHER_PADDING_PKCS7 set_padding:POLARSSL_CIPHER_AES_128_CBC:POLARSSL_PADDING_PKCS7:0