|
|
|
@ -56,7 +56,7 @@ struct fullstack_secure_fixture_data { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( |
|
|
|
|
grpc_channel_args *client_args, grpc_channel_args *server_args) { |
|
|
|
|
const grpc_channel_args *client_args, const grpc_channel_args *server_args) { |
|
|
|
|
grpc_end2end_test_fixture f; |
|
|
|
|
int port = grpc_pick_unused_port_or_die(); |
|
|
|
|
fullstack_secure_fixture_data *ffd = new fullstack_secure_fixture_data(); |
|
|
|
@ -79,7 +79,7 @@ static void process_auth_failure(void *state, grpc_auth_context *ctx, const grpc |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void cronet_init_client_secure_fullstack(grpc_end2end_test_fixture *f, |
|
|
|
|
grpc_channel_args *client_args, |
|
|
|
|
const grpc_channel_args *client_args, |
|
|
|
|
stream_engine *cronetEngine) { |
|
|
|
|
fullstack_secure_fixture_data *ffd = (fullstack_secure_fixture_data *)f->fixture_data; |
|
|
|
|
f->client = |
|
|
|
@ -88,7 +88,7 @@ static void cronet_init_client_secure_fullstack(grpc_end2end_test_fixture *f, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void chttp2_init_server_secure_fullstack(grpc_end2end_test_fixture *f, |
|
|
|
|
grpc_channel_args *server_args, |
|
|
|
|
const grpc_channel_args *server_args, |
|
|
|
|
grpc_server_credentials *server_creds) { |
|
|
|
|
fullstack_secure_fixture_data *ffd = (fullstack_secure_fixture_data *)f->fixture_data; |
|
|
|
|
if (f->server) { |
|
|
|
@ -107,16 +107,16 @@ static void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void cronet_init_client_simple_ssl_secure_fullstack(grpc_end2end_test_fixture *f, |
|
|
|
|
grpc_channel_args *client_args) { |
|
|
|
|
const grpc_channel_args *client_args) { |
|
|
|
|
grpc_core::ExecCtx exec_ctx; |
|
|
|
|
stream_engine *cronetEngine = [Cronet getGlobalEngine]; |
|
|
|
|
|
|
|
|
|
grpc_channel_args *new_client_args = grpc_channel_args_copy(client_args); |
|
|
|
|
const grpc_channel_args *new_client_args = grpc_channel_args_copy(client_args); |
|
|
|
|
cronet_init_client_secure_fullstack(f, new_client_args, cronetEngine); |
|
|
|
|
grpc_channel_args_destroy(new_client_args); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int fail_server_auth_check(grpc_channel_args *server_args) { |
|
|
|
|
static int fail_server_auth_check(const grpc_channel_args *server_args) { |
|
|
|
|
size_t i; |
|
|
|
|
if (server_args == NULL) return 0; |
|
|
|
|
for (i = 0; i < server_args->num_args; i++) { |
|
|
|
@ -128,7 +128,7 @@ static int fail_server_auth_check(grpc_channel_args *server_args) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void chttp2_init_server_simple_ssl_secure_fullstack(grpc_end2end_test_fixture *f, |
|
|
|
|
grpc_channel_args *server_args) { |
|
|
|
|
const grpc_channel_args *server_args) { |
|
|
|
|
grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key, test_server1_cert}; |
|
|
|
|
grpc_server_credentials *ssl_creds = |
|
|
|
|
grpc_ssl_server_credentials_create(NULL, &pem_cert_key_pair, 1, 0, NULL); |
|
|
|
|