Go to the documentation of this file.
53 property->value.length) == 0);
58 property->value.length) == 0);
78 return &fake_fixture->
base;
102 unsigned int* bit_array =
static_cast<unsigned int*
>(
106 unsigned int v = val;
108 bit_array[
ind] = (
v & mask) ? 1 : 0;
116 bit_array[0], bit_array[1], bit_array[2], bit_array[3], bit_array[4],
117 bit_array[5], bit_array[6]);
125 const size_t odd_sizes[] = {1025, 2051, 4103, 8207, 16409};
126 const size_t size =
sizeof(odd_sizes) /
sizeof(
size_t);
127 for (
size_t ind1 = 0; ind1 <
size; ind1++) {
128 for (
size_t ind2 = 0; ind2 <
size; ind2++) {
129 for (
size_t ind3 = 0; ind3 <
size; ind3++) {
130 for (
size_t ind4 = 0; ind4 <
size; ind4++) {
131 for (
size_t ind5 = 0; ind5 <
size; ind5++) {
136 fake_fixture->
base.
config, odd_sizes[ind1], odd_sizes[ind2],
137 odd_sizes[ind3], odd_sizes[ind4], odd_sizes[ind5]);
147 int main(
int argc,
char** argv) {
void tsi_test_frame_protector_config_set_buffer_size(tsi_test_frame_protector_config *config, size_t read_buffer_allocated_size, size_t message_buffer_allocated_size, size_t protected_buffer_size, size_t client_max_output_protected_frame_size, size_t server_max_output_protected_frame_size)
#define TSI_TEST_NUM_OF_ARGUMENTS
void fake_tsi_test_do_handshake_tiny_handshake_buffer()
#define TSI_FAKE_SECURITY_LEVEL
#define TSI_SECURITY_LEVEL_PEER_PROPERTY
GPRAPI void gpr_free(void *ptr)
void tsi_test_frame_protector_config_destroy(tsi_test_frame_protector_config *config)
void fake_tsi_test_do_round_trip_odd_buffer_size()
void tsi_test_fixture_init(tsi_test_fixture *fixture)
void tsi_test_fixture_destroy(tsi_test_fixture *fixture)
tsi_handshaker * tsi_create_fake_handshaker(int is_client)
GPRAPI void * gpr_zalloc(size_t size)
#define TSI_FAKE_CERTIFICATE_TYPE
#define TSI_TEST_SMALL_HANDSHAKE_BUFFER_SIZE
static const char fixture[]
void tsi_test_do_round_trip(tsi_test_fixture *fixture)
void fake_tsi_test_do_handshake_small_handshake_buffer()
static tsi_test_fixture * fake_tsi_test_fixture_create()
void fake_tsi_test_do_handshake()
tsi_test_frame_protector_config * config
tsi_test_frame_protector_config * tsi_test_frame_protector_config_create(bool use_default_read_buffer_allocated_size, bool use_default_message_buffer_allocated_size, bool use_default_protected_buffer_size, bool use_default_client_message, bool use_default_server_message, bool use_default_client_max_output_protected_frame_size, bool use_default_server_max_output_protected_frame_size)
struct fake_tsi_test_fixture fake_tsi_test_fixture
const tsi_peer_property * tsi_peer_get_property_by_name(const tsi_peer *peer, const char *name)
const tsi_test_fixture_vtable * vtable
static void fake_test_check_handshaker_peers(tsi_test_fixture *fixture)
void tsi_test_do_handshake(tsi_test_fixture *fixture)
int main(int argc, char **argv)
tsi_result tsi_handshaker_result_extract_peer(const tsi_handshaker_result *self, tsi_peer *peer)
#define TSI_TEST_NUM_OF_COMBINATIONS
#define TSI_TEST_TINY_HANDSHAKE_BUFFER_SIZE
static void fake_test_destruct(tsi_test_fixture *fixture)
static void validate_handshaker_peers(tsi_handshaker_result *result)
static void fake_test_setup_handshakers(tsi_test_fixture *fixture)
void fake_tsi_test_do_round_trip_for_all_configs()
#define TSI_CERTIFICATE_TYPE_PEER_PROPERTY
GRPCAPI void grpc_init(void)
void tsi_peer_destruct(tsi_peer *self)
GRPCAPI void grpc_shutdown(void)
static const struct tsi_test_fixture_vtable vtable
grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:22