Lines Matching refs:CHK

1133 #define CHK( x )                                \
1219 CHK( cipher_info != NULL );
1220 CHK( cipher_info->iv_size <= 16 );
1221 CHK( cipher_info->key_bitlen % 8 == 0 );
1228 CHK( ( key0 = mbedtls_calloc( 1, keylen + 1 ) ) != NULL );
1229 CHK( ( key1 = mbedtls_calloc( 1, keylen + 1 ) ) != NULL );
1234 CHK( mbedtls_cipher_setup( &t_in->cipher_ctx_enc, cipher_info ) == 0 );
1235 CHK( mbedtls_cipher_setup( &t_in->cipher_ctx_dec, cipher_info ) == 0 );
1236 CHK( mbedtls_cipher_setup( &t_out->cipher_ctx_enc, cipher_info ) == 0 );
1237 CHK( mbedtls_cipher_setup( &t_out->cipher_ctx_dec, cipher_info ) == 0 );
1242 CHK( mbedtls_cipher_set_padding_mode( &t_in->cipher_ctx_enc,
1244 CHK( mbedtls_cipher_set_padding_mode( &t_in->cipher_ctx_dec,
1246 CHK( mbedtls_cipher_set_padding_mode( &t_out->cipher_ctx_enc,
1248 CHK( mbedtls_cipher_set_padding_mode( &t_out->cipher_ctx_dec,
1253 CHK( mbedtls_cipher_setkey( &t_in->cipher_ctx_enc, key0,
1255 CHK( mbedtls_cipher_setkey( &t_in->cipher_ctx_dec, key1,
1257 CHK( mbedtls_cipher_setkey( &t_out->cipher_ctx_enc, key1,
1259 CHK( mbedtls_cipher_setkey( &t_out->cipher_ctx_dec, key0,
1271 CHK( md_info != NULL );
1275 CHK( ( md0 = mbedtls_calloc( 1, maclen ) ) != NULL );
1276 CHK( ( md1 = mbedtls_calloc( 1, maclen ) ) != NULL );
1280 CHK( mbedtls_md_setup( &t_out->md_ctx_enc, md_info, 1 ) == 0 );
1281 CHK( mbedtls_md_setup( &t_out->md_ctx_dec, md_info, 1 ) == 0 );
1282 CHK( mbedtls_md_setup( &t_in->md_ctx_enc, md_info, 1 ) == 0 );
1283 CHK( mbedtls_md_setup( &t_in->md_ctx_dec, md_info, 1 ) == 0 );
1285 CHK( mbedtls_md_hmac_starts( &t_in->md_ctx_enc,
1287 CHK( mbedtls_md_hmac_starts( &t_in->md_ctx_dec,
1289 CHK( mbedtls_md_hmac_starts( &t_out->md_ctx_enc,
1291 CHK( mbedtls_md_hmac_starts( &t_out->md_ctx_dec,