Fix AES-OFB support for errors, tests and self-test
Adds error handling into mbedtls_aes_crypt_ofb for AES errors, a self-test
for the OFB mode using NIST SP 800-38A test vectors and adds a check to
potential return errors in setting the AES encryption key in the OFB test
suite.
diff --git a/tests/suites/test_suite_aes.function b/tests/suites/test_suite_aes.function
index e1792dd..fc2cbac 100644
--- a/tests/suites/test_suite_aes.function
+++ b/tests/suites/test_suite_aes.function
@@ -316,7 +316,7 @@
iv_len = unhexify( iv_str, hex_iv_string );
in_buffer_len = unhexify( src_str, hex_src_string );
- mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 );
+ TEST_ASSERT( mbedtls_aes_setkey_enc( &ctx, key_str, key_len * 8 ) == 0 );
src_str_next = src_str;
while( in_buffer_len > 0 )