mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-04 21:56:21 +01:00
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.
This commit is contained in:
parent
7487c5b2c8
commit
ad4e4938d1
3 changed files with 139 additions and 5 deletions
|
|
@ -316,7 +316,7 @@ void aes_encrypt_ofb( int fragment_size, char *hex_key_string,
|
|||
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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue