|
|
@ -97,16 +97,16 @@ class grpc_fake_channel_security_connector final |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void add_handshakers(const grpc_channel_args* args, |
|
|
|
void add_handshakers(const grpc_channel_args* args, |
|
|
|
grpc_pollset_set* interested_parties, |
|
|
|
grpc_pollset_set* /*interested_parties*/, |
|
|
|
grpc_core::HandshakeManager* handshake_mgr) override { |
|
|
|
grpc_core::HandshakeManager* handshake_mgr) override { |
|
|
|
handshake_mgr->Add(grpc_core::SecurityHandshakerCreate( |
|
|
|
handshake_mgr->Add(grpc_core::SecurityHandshakerCreate( |
|
|
|
tsi_create_fake_handshaker(/*is_client=*/true), this, args)); |
|
|
|
tsi_create_fake_handshaker(/*is_client=*/true), this, args)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool check_call_host(grpc_core::StringView host, |
|
|
|
bool check_call_host(grpc_core::StringView host, |
|
|
|
grpc_auth_context* auth_context, |
|
|
|
grpc_auth_context* /*auth_context*/, |
|
|
|
grpc_closure* on_call_host_checked, |
|
|
|
grpc_closure* /*on_call_host_checked*/, |
|
|
|
grpc_error** error) override { |
|
|
|
grpc_error** /*error*/) override { |
|
|
|
grpc_core::StringView authority_hostname; |
|
|
|
grpc_core::StringView authority_hostname; |
|
|
|
grpc_core::StringView authority_ignored_port; |
|
|
|
grpc_core::StringView authority_ignored_port; |
|
|
|
grpc_core::StringView target_hostname; |
|
|
|
grpc_core::StringView target_hostname; |
|
|
@ -135,7 +135,7 @@ class grpc_fake_channel_security_connector final |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void cancel_check_call_host(grpc_closure* on_call_host_checked, |
|
|
|
void cancel_check_call_host(grpc_closure* /*on_call_host_checked*/, |
|
|
|
grpc_error* error) override { |
|
|
|
grpc_error* error) override { |
|
|
|
GRPC_ERROR_UNREF(error); |
|
|
|
GRPC_ERROR_UNREF(error); |
|
|
|
} |
|
|
|
} |
|
|
@ -213,7 +213,7 @@ class grpc_fake_channel_security_connector final |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
static void fake_check_peer( |
|
|
|
static void fake_check_peer( |
|
|
|
grpc_security_connector* sc, tsi_peer peer, |
|
|
|
grpc_security_connector* /*sc*/, tsi_peer peer, |
|
|
|
grpc_core::RefCountedPtr<grpc_auth_context>* auth_context, |
|
|
|
grpc_core::RefCountedPtr<grpc_auth_context>* auth_context, |
|
|
|
grpc_closure* on_peer_checked) { |
|
|
|
grpc_closure* on_peer_checked) { |
|
|
|
const char* prop_name; |
|
|
|
const char* prop_name; |
|
|
@ -250,7 +250,7 @@ end: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void grpc_fake_channel_security_connector::check_peer( |
|
|
|
void grpc_fake_channel_security_connector::check_peer( |
|
|
|
tsi_peer peer, grpc_endpoint* ep, |
|
|
|
tsi_peer peer, grpc_endpoint* /*ep*/, |
|
|
|
grpc_core::RefCountedPtr<grpc_auth_context>* auth_context, |
|
|
|
grpc_core::RefCountedPtr<grpc_auth_context>* auth_context, |
|
|
|
grpc_closure* on_peer_checked) { |
|
|
|
grpc_closure* on_peer_checked) { |
|
|
|
fake_check_peer(this, peer, auth_context, on_peer_checked); |
|
|
|
fake_check_peer(this, peer, auth_context, on_peer_checked); |
|
|
@ -266,14 +266,14 @@ class grpc_fake_server_security_connector |
|
|
|
std::move(server_creds)) {} |
|
|
|
std::move(server_creds)) {} |
|
|
|
~grpc_fake_server_security_connector() override = default; |
|
|
|
~grpc_fake_server_security_connector() override = default; |
|
|
|
|
|
|
|
|
|
|
|
void check_peer(tsi_peer peer, grpc_endpoint* ep, |
|
|
|
void check_peer(tsi_peer peer, grpc_endpoint* /*ep*/, |
|
|
|
grpc_core::RefCountedPtr<grpc_auth_context>* auth_context, |
|
|
|
grpc_core::RefCountedPtr<grpc_auth_context>* auth_context, |
|
|
|
grpc_closure* on_peer_checked) override { |
|
|
|
grpc_closure* on_peer_checked) override { |
|
|
|
fake_check_peer(this, peer, auth_context, on_peer_checked); |
|
|
|
fake_check_peer(this, peer, auth_context, on_peer_checked); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void add_handshakers(const grpc_channel_args* args, |
|
|
|
void add_handshakers(const grpc_channel_args* args, |
|
|
|
grpc_pollset_set* interested_parties, |
|
|
|
grpc_pollset_set* /*interested_parties*/, |
|
|
|
grpc_core::HandshakeManager* handshake_mgr) override { |
|
|
|
grpc_core::HandshakeManager* handshake_mgr) override { |
|
|
|
handshake_mgr->Add(grpc_core::SecurityHandshakerCreate( |
|
|
|
handshake_mgr->Add(grpc_core::SecurityHandshakerCreate( |
|
|
|
tsi_create_fake_handshaker(/*=is_client*/ false), this, args)); |
|
|
|
tsi_create_fake_handshaker(/*=is_client*/ false), this, args)); |
|
|
|