Skip to content

Commit 6f90ed8

Browse files
Ron Eldorsimonbutcher
authored andcommitted
Fix CI failure
Test IV special cases only if `MBEDTLS_CIPHER_MODE_CBC` is defined
1 parent 4e64e0b commit 6f90ed8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/suites/test_suite_cipher.function

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,15 @@ void cipher_special_behaviours( )
9898
mbedtls_cipher_context_t ctx;
9999
unsigned char input[32];
100100
unsigned char output[32];
101+
#if defined (MBEDTLS_CIPHER_MODE_CBC)
101102
unsigned char iv[32];
103+
#endif
102104
size_t olen = 0;
103105

104106
mbedtls_cipher_init( &ctx );
105107
memset( input, 0, sizeof( input ) );
106108
memset( output, 0, sizeof( output ) );
109+
#if defined (MBEDTLS_CIPHER_MODE_CBC)
107110
memset( iv, 0, sizeof( iv ) );
108111

109112
/* Check and get info structures */
@@ -121,6 +124,7 @@ void cipher_special_behaviours( )
121124
== MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA );
122125

123126
mbedtls_cipher_free( &ctx );
127+
#endif /* MBEDTLS_CIPHER_MODE_CBC */
124128
cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_ECB );
125129
TEST_ASSERT( NULL != cipher_info );
126130

0 commit comments

Comments
 (0)