aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/tsi/fake_transport_security_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/tsi/fake_transport_security_test.c')
-rw-r--r--test/core/tsi/fake_transport_security_test.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/core/tsi/fake_transport_security_test.c b/test/core/tsi/fake_transport_security_test.c
index 11be8802b7..39b36cd848 100644
--- a/test/core/tsi/fake_transport_security_test.c
+++ b/test/core/tsi/fake_transport_security_test.c
@@ -33,18 +33,18 @@ typedef struct fake_tsi_test_fixture {
tsi_test_fixture base;
} fake_tsi_test_fixture;
-static void fake_test_setup_handshakers(tsi_test_fixture *fixture) {
+static void fake_test_setup_handshakers(tsi_test_fixture* fixture) {
fixture->client_handshaker =
tsi_create_fake_handshaker(true /* is_client. */);
fixture->server_handshaker =
tsi_create_fake_handshaker(false /* is_client. */);
}
-static void validate_handshaker_peers(tsi_handshaker_result *result) {
+static void validate_handshaker_peers(tsi_handshaker_result* result) {
GPR_ASSERT(result != NULL);
tsi_peer peer;
GPR_ASSERT(tsi_handshaker_result_extract_peer(result, &peer) == TSI_OK);
- const tsi_peer_property *property =
+ const tsi_peer_property* property =
tsi_peer_get_property_by_name(&peer, TSI_CERTIFICATE_TYPE_PEER_PROPERTY);
GPR_ASSERT(property != NULL);
GPR_ASSERT(memcmp(property->value.data, TSI_FAKE_CERTIFICATE_TYPE,
@@ -52,46 +52,46 @@ static void validate_handshaker_peers(tsi_handshaker_result *result) {
tsi_peer_destruct(&peer);
}
-static void fake_test_check_handshaker_peers(tsi_test_fixture *fixture) {
+static void fake_test_check_handshaker_peers(tsi_test_fixture* fixture) {
validate_handshaker_peers(fixture->client_result);
validate_handshaker_peers(fixture->server_result);
}
-static void fake_test_destruct(tsi_test_fixture *fixture) {}
+static void fake_test_destruct(tsi_test_fixture* fixture) {}
static const struct tsi_test_fixture_vtable vtable = {
fake_test_setup_handshakers, fake_test_check_handshaker_peers,
fake_test_destruct};
-static tsi_test_fixture *fake_tsi_test_fixture_create() {
- fake_tsi_test_fixture *fake_fixture = gpr_zalloc(sizeof(*fake_fixture));
+static tsi_test_fixture* fake_tsi_test_fixture_create() {
+ fake_tsi_test_fixture* fake_fixture = gpr_zalloc(sizeof(*fake_fixture));
tsi_test_fixture_init(&fake_fixture->base);
fake_fixture->base.vtable = &vtable;
return &fake_fixture->base;
}
void fake_tsi_test_do_handshake_tiny_handshake_buffer() {
- tsi_test_fixture *fixture = fake_tsi_test_fixture_create();
+ tsi_test_fixture* fixture = fake_tsi_test_fixture_create();
fixture->handshake_buffer_size = TSI_TEST_TINY_HANDSHAKE_BUFFER_SIZE;
tsi_test_do_handshake(fixture);
tsi_test_fixture_destroy(fixture);
}
void fake_tsi_test_do_handshake_small_handshake_buffer() {
- tsi_test_fixture *fixture = fake_tsi_test_fixture_create();
+ tsi_test_fixture* fixture = fake_tsi_test_fixture_create();
fixture->handshake_buffer_size = TSI_TEST_SMALL_HANDSHAKE_BUFFER_SIZE;
tsi_test_do_handshake(fixture);
tsi_test_fixture_destroy(fixture);
}
void fake_tsi_test_do_handshake() {
- tsi_test_fixture *fixture = fake_tsi_test_fixture_create();
+ tsi_test_fixture* fixture = fake_tsi_test_fixture_create();
tsi_test_do_handshake(fixture);
tsi_test_fixture_destroy(fixture);
}
void fake_tsi_test_do_round_trip_for_all_configs() {
- unsigned int *bit_array =
+ unsigned int* bit_array =
gpr_zalloc(sizeof(unsigned int) * TSI_TEST_NUM_OF_ARGUMENTS);
const unsigned int mask = 1U << (TSI_TEST_NUM_OF_ARGUMENTS - 1);
for (unsigned int val = 0; val < TSI_TEST_NUM_OF_COMBINATIONS; val++) {
@@ -100,8 +100,8 @@ void fake_tsi_test_do_round_trip_for_all_configs() {
bit_array[ind] = (v & mask) ? 1 : 0;
v <<= 1;
}
- tsi_test_fixture *fixture = fake_tsi_test_fixture_create();
- fake_tsi_test_fixture *fake_fixture = (fake_tsi_test_fixture *)fixture;
+ tsi_test_fixture* fixture = fake_tsi_test_fixture_create();
+ fake_tsi_test_fixture* fake_fixture = (fake_tsi_test_fixture*)fixture;
tsi_test_frame_protector_config_destroy(fake_fixture->base.config);
fake_fixture->base.config = tsi_test_frame_protector_config_create(
bit_array[0], bit_array[1], bit_array[2], bit_array[3], bit_array[4],
@@ -120,9 +120,9 @@ void fake_tsi_test_do_round_trip_odd_buffer_size() {
for (size_t ind3 = 0; ind3 < size; ind3++) {
for (size_t ind4 = 0; ind4 < size; ind4++) {
for (size_t ind5 = 0; ind5 < size; ind5++) {
- tsi_test_fixture *fixture = fake_tsi_test_fixture_create();
- fake_tsi_test_fixture *fake_fixture =
- (fake_tsi_test_fixture *)fixture;
+ tsi_test_fixture* fixture = fake_tsi_test_fixture_create();
+ fake_tsi_test_fixture* fake_fixture =
+ (fake_tsi_test_fixture*)fixture;
tsi_test_frame_protector_config_set_buffer_size(
fake_fixture->base.config, odd_sizes[ind1], odd_sizes[ind2],
odd_sizes[ind3], odd_sizes[ind4], odd_sizes[ind5]);
@@ -135,7 +135,7 @@ void fake_tsi_test_do_round_trip_odd_buffer_size() {
}
}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_init();
fake_tsi_test_do_handshake_tiny_handshake_buffer();