aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/handshake
diff options
context:
space:
mode:
authorGravatar Alexander Polcyn <apolcyn@google.com>2017-11-13 20:48:20 -0800
committerGravatar Alexander Polcyn <apolcyn@google.com>2017-11-13 20:48:20 -0800
commit16ba80c850567c351a425bc9c14c84ed23220b86 (patch)
treecd7af33dd97e112a59135b775ac7b8c5d5a453d9 /test/core/handshake
parent248c4f5848c8761fc16352e1f2f1e6d047780b4e (diff)
parentb0bad8f3864dc9c8745736fe68efe513b2b84932 (diff)
Merge remote-tracking branch 'upstream/master' into pass_args_to_tsi
Diffstat (limited to 'test/core/handshake')
-rw-r--r--test/core/handshake/client_ssl.cc10
-rw-r--r--test/core/handshake/server_ssl_common.cc14
2 files changed, 12 insertions, 12 deletions
diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc
index b8cfd627a9..2b149a73b3 100644
--- a/test/core/handshake/client_ssl.cc
+++ b/test/core/handshake/client_ssl.cc
@@ -246,7 +246,7 @@ static bool client_ssl_test(char* server_alpn_preferred) {
pem_key_cert_pair.private_key = (const char*)GRPC_SLICE_START_PTR(key_slice);
pem_key_cert_pair.cert_chain = (const char*)GRPC_SLICE_START_PTR(cert_slice);
grpc_channel_credentials* ssl_creds =
- grpc_ssl_credentials_create(ca_cert, &pem_key_cert_pair, NULL);
+ grpc_ssl_credentials_create(ca_cert, &pem_key_cert_pair, nullptr);
// Establish a channel pointing at the TLS server. Since the gRPC runtime is
// lazy, this won't necessarily establish a connection yet.
@@ -260,7 +260,7 @@ static bool client_ssl_test(char* server_alpn_preferred) {
grpc_args.num_args = 1;
grpc_args.args = &ssl_name_override;
grpc_channel* channel =
- grpc_secure_channel_create(ssl_creds, target, &grpc_args, NULL);
+ grpc_secure_channel_create(ssl_creds, target, &grpc_args, nullptr);
GPR_ASSERT(channel);
gpr_free(target);
@@ -274,13 +274,13 @@ static bool client_ssl_test(char* server_alpn_preferred) {
// completed and we know that the client's ALPN list satisfied the server.
int retries = 10;
grpc_connectivity_state state = GRPC_CHANNEL_IDLE;
- grpc_completion_queue* cq = grpc_completion_queue_create_for_next(NULL);
+ grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
while (state != GRPC_CHANNEL_READY && retries-- > 0) {
grpc_channel_watch_connectivity_state(
- channel, state, grpc_timeout_seconds_to_deadline(3), cq, NULL);
+ channel, state, grpc_timeout_seconds_to_deadline(3), cq, nullptr);
gpr_timespec cq_deadline = grpc_timeout_seconds_to_deadline(5);
- grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL);
+ grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, nullptr);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
state =
grpc_channel_check_connectivity_state(channel, 0 /* try_to_connect */);
diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc
index 2ad7a13adb..599b2814e0 100644
--- a/test/core/handshake/server_ssl_common.cc
+++ b/test/core/handshake/server_ssl_common.cc
@@ -82,18 +82,18 @@ static void server_thread(void* arg) {
pem_key_cert_pair.private_key = (const char*)GRPC_SLICE_START_PTR(key_slice);
pem_key_cert_pair.cert_chain = (const char*)GRPC_SLICE_START_PTR(cert_slice);
grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create(
- ca_cert, &pem_key_cert_pair, 1, 0, NULL);
+ ca_cert, &pem_key_cert_pair, 1, 0, nullptr);
// Start server listening on local port.
char* addr;
gpr_asprintf(&addr, "127.0.0.1:%d", port);
- grpc_server* server = grpc_server_create(NULL, NULL);
+ grpc_server* server = grpc_server_create(nullptr, nullptr);
GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds));
free(addr);
- grpc_completion_queue* cq = grpc_completion_queue_create_for_next(NULL);
+ grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr);
- grpc_server_register_completion_queue(server, cq, NULL);
+ grpc_server_register_completion_queue(server, cq, nullptr);
grpc_server_start(server);
// Wait a bounded number of time until client_handshake_complete is set,
@@ -101,16 +101,16 @@ static void server_thread(void* arg) {
int retries = 10;
while (!gpr_event_get(&client_handshake_complete) && retries-- > 0) {
const gpr_timespec cq_deadline = grpc_timeout_seconds_to_deadline(1);
- grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL);
+ grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, nullptr);
GPR_ASSERT(ev.type == GRPC_QUEUE_TIMEOUT);
}
gpr_log(GPR_INFO, "Shutting down server");
- grpc_server_shutdown_and_notify(server, cq, NULL);
+ grpc_server_shutdown_and_notify(server, cq, nullptr);
grpc_completion_queue_shutdown(cq);
const gpr_timespec cq_deadline = grpc_timeout_seconds_to_deadline(5);
- grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, NULL);
+ grpc_event ev = grpc_completion_queue_next(cq, cq_deadline, nullptr);
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
grpc_server_destroy(server);