summaryrefslogtreecommitdiff
path: root/grpc/src/core/lib/http/httpcli_security_connector.cc
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/src/core/lib/http/httpcli_security_connector.cc')
-rw-r--r--grpc/src/core/lib/http/httpcli_security_connector.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/grpc/src/core/lib/http/httpcli_security_connector.cc b/grpc/src/core/lib/http/httpcli_security_connector.cc
index 15aea333..e26f99b4 100644
--- a/grpc/src/core/lib/http/httpcli_security_connector.cc
+++ b/grpc/src/core/lib/http/httpcli_security_connector.cc
@@ -91,7 +91,7 @@ class grpc_httpcli_ssl_channel_security_connector final
void check_peer(tsi_peer peer, grpc_endpoint* /*ep*/,
grpc_core::RefCountedPtr<grpc_auth_context>* /*auth_context*/,
grpc_closure* on_peer_checked) override {
- grpc_error* error = GRPC_ERROR_NONE;
+ grpc_error_handle error = GRPC_ERROR_NONE;
/* Check the peer name. */
if (secure_peer_name_ != nullptr &&
@@ -105,6 +105,11 @@ class grpc_httpcli_ssl_channel_security_connector final
tsi_peer_destruct(&peer);
}
+ void cancel_check_peer(grpc_closure* /*on_peer_checked*/,
+ grpc_error_handle error) override {
+ GRPC_ERROR_UNREF(error);
+ }
+
int cmp(const grpc_security_connector* other_sc) const override {
auto* other =
reinterpret_cast<const grpc_httpcli_ssl_channel_security_connector*>(
@@ -115,13 +120,13 @@ class grpc_httpcli_ssl_channel_security_connector final
bool check_call_host(absl::string_view /*host*/,
grpc_auth_context* /*auth_context*/,
grpc_closure* /*on_call_host_checked*/,
- grpc_error** error) override {
+ grpc_error_handle* error) override {
*error = GRPC_ERROR_NONE;
return true;
}
void cancel_check_call_host(grpc_closure* /*on_call_host_checked*/,
- grpc_error* error) override {
+ grpc_error_handle error) override {
GRPC_ERROR_UNREF(error);
}
@@ -160,13 +165,12 @@ struct on_done_closure {
void* arg;
grpc_core::RefCountedPtr<grpc_core::HandshakeManager> handshake_mgr;
};
-static void on_handshake_done(void* arg, grpc_error* error) {
+static void on_handshake_done(void* arg, grpc_error_handle error) {
auto* args = static_cast<grpc_core::HandshakerArgs*>(arg);
on_done_closure* c = static_cast<on_done_closure*>(args->user_data);
if (error != GRPC_ERROR_NONE) {
- const char* msg = grpc_error_string(error);
- gpr_log(GPR_ERROR, "Secure transport setup failed: %s", msg);
-
+ gpr_log(GPR_ERROR, "Secure transport setup failed: %s",
+ grpc_error_std_string(error).c_str());
c->func(c->arg, nullptr);
} else {
grpc_channel_args_destroy(args->args);
@@ -203,8 +207,8 @@ static void ssl_handshake(void* arg, grpc_endpoint* tcp, const char* host,
grpc_channel_args args = {1, &channel_arg};
c->handshake_mgr = grpc_core::MakeRefCounted<grpc_core::HandshakeManager>();
grpc_core::HandshakerRegistry::AddHandshakers(
- grpc_core::HANDSHAKER_CLIENT, &args, /*interested_parties=*/nullptr,
- c->handshake_mgr.get());
+ grpc_core::HANDSHAKER_CLIENT, &args,
+ /*interested_parties=*/nullptr, c->handshake_mgr.get());
c->handshake_mgr->DoHandshake(tcp, /*channel_args=*/nullptr, deadline,
/*acceptor=*/nullptr, on_handshake_done,
/*user_data=*/c);