static grpc_security_status ssl_server_check_peer(grpc_security_connector *sc, tsi_peer peer, grpc_security_check_cb cb, void *user_data) { grpc_security_status status = ssl_check_peer(sc, NULL, &peer); tsi_peer_destruct(&peer); return status; }
static grpc_security_status ssl_server_check_peer(grpc_security_context *ctx, tsi_peer peer, grpc_security_check_cb cb, void *user_data) { /* TODO(jboeuf): Find a way to expose the peer to the authorization layer. */ grpc_security_status status = ssl_check_peer(NULL, &peer); tsi_peer_destruct(&peer); return status; }
static void ssl_server_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, grpc_security_peer_check_cb cb, void *user_data) { grpc_auth_context *auth_context = NULL; grpc_security_status status = ssl_check_peer(sc, NULL, &peer, &auth_context); tsi_peer_destruct(&peer); cb(exec_ctx, user_data, status, auth_context); grpc_auth_context_unref(auth_context); }
static grpc_security_status ssl_channel_check_peer(grpc_security_connector *sc, tsi_peer peer, grpc_security_check_cb cb, void *user_data) { grpc_ssl_channel_security_connector *c = (grpc_ssl_channel_security_connector *)sc; grpc_security_status status; tsi_peer_destruct(&c->peer); c->peer = peer; status = ssl_check_peer(sc, c->overridden_target_name != NULL ? c->overridden_target_name : c->target_name, &peer); return status; }
static void ssl_channel_check_peer(grpc_exec_ctx *exec_ctx, grpc_security_connector *sc, tsi_peer peer, grpc_security_peer_check_cb cb, void *user_data) { grpc_ssl_channel_security_connector *c = (grpc_ssl_channel_security_connector *)sc; grpc_security_status status; grpc_auth_context *auth_context = NULL; status = ssl_check_peer(sc, c->overridden_target_name != NULL ? c->overridden_target_name : c->target_name, &peer, &auth_context); cb(exec_ctx, user_data, status, auth_context); grpc_auth_context_unref(auth_context); tsi_peer_destruct(&peer); }