alts_tsi_handshaker.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
20 
22 
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 
27 #include "upb/upb.hpp"
28 
29 #include <grpc/grpc_security.h>
30 #include <grpc/support/alloc.h>
31 #include <grpc/support/log.h>
33 #include <grpc/support/sync.h>
34 #include <grpc/support/thd_id.h>
35 
38 #include "src/core/lib/gprpp/thd.h"
47 
48 /* Main struct for ALTS TSI handshaker. */
52  bool is_client;
53  bool has_sent_start_message = false;
59  grpc_channel* channel = nullptr;
61  // mu synchronizes all fields below. Note these are the
62  // only fields that can be concurrently accessed (due to
63  // potential concurrency of tsi_handshaker_shutdown and
64  // tsi_handshaker_next).
67  // shutdown effectively follows base.handshake_shutdown,
68  // but is synchronized by the mutex of this object.
69  bool shutdown = false;
70  // Maximum frame size used by frame protector.
72 };
73 
74 /* Main struct for ALTS TSI handshaker result. */
78  char* key_data;
79  unsigned char* unused_bytes;
82  bool is_client;
84  // Peer's maximum frame size.
87 
89  const tsi_handshaker_result* self, tsi_peer* peer) {
90  if (self == nullptr || peer == nullptr) {
91  gpr_log(GPR_ERROR, "Invalid argument to handshaker_result_extract_peer()");
92  return TSI_INVALID_ARGUMENT;
93  }
95  reinterpret_cast<alts_tsi_handshaker_result*>(
96  const_cast<tsi_handshaker_result*>(self));
99  int index = 0;
100  if (ok != TSI_OK) {
101  gpr_log(GPR_ERROR, "Failed to construct tsi peer");
102  return ok;
103  }
104  GPR_ASSERT(&peer->properties[index] != nullptr);
107  &peer->properties[index]);
108  if (ok != TSI_OK) {
109  tsi_peer_destruct(peer);
110  gpr_log(GPR_ERROR, "Failed to set tsi peer property");
111  return ok;
112  }
113  index++;
114  GPR_ASSERT(&peer->properties[index] != nullptr);
117  &peer->properties[index]);
118  if (ok != TSI_OK) {
119  tsi_peer_destruct(peer);
120  gpr_log(GPR_ERROR, "Failed to set tsi peer property");
121  }
122  index++;
123  GPR_ASSERT(&peer->properties[index] != nullptr);
126  reinterpret_cast<char*>(GRPC_SLICE_START_PTR(result->rpc_versions)),
127  GRPC_SLICE_LENGTH(result->rpc_versions), &peer->properties[index]);
128  if (ok != TSI_OK) {
129  tsi_peer_destruct(peer);
130  gpr_log(GPR_ERROR, "Failed to set tsi peer property");
131  }
132  index++;
133  GPR_ASSERT(&peer->properties[index] != nullptr);
136  reinterpret_cast<char*>(GRPC_SLICE_START_PTR(result->serialized_context)),
137  GRPC_SLICE_LENGTH(result->serialized_context), &peer->properties[index]);
138  if (ok != TSI_OK) {
139  tsi_peer_destruct(peer);
140  gpr_log(GPR_ERROR, "Failed to set tsi peer property");
141  }
142  index++;
143  GPR_ASSERT(&peer->properties[index] != nullptr);
147  &peer->properties[index]);
148  if (ok != TSI_OK) {
149  tsi_peer_destruct(peer);
150  gpr_log(GPR_ERROR, "Failed to set tsi peer property");
151  }
153  return ok;
154 }
155 
157  const tsi_handshaker_result* /*self*/,
158  tsi_frame_protector_type* frame_protector_type) {
159  *frame_protector_type = TSI_FRAME_PROTECTOR_NORMAL_OR_ZERO_COPY;
160  return TSI_OK;
161 }
162 
164  const tsi_handshaker_result* self, size_t* max_output_protected_frame_size,
165  tsi_zero_copy_grpc_protector** protector) {
166  if (self == nullptr || protector == nullptr) {
168  "Invalid arguments to create_zero_copy_grpc_protector()");
169  return TSI_INVALID_ARGUMENT;
170  }
172  reinterpret_cast<alts_tsi_handshaker_result*>(
173  const_cast<tsi_handshaker_result*>(self));
174 
175  // In case the peer does not send max frame size (e.g. peer is gRPC Go or
176  // peer uses an old binary), the negotiated frame size is set to
177  // kTsiAltsMinFrameSize (ignoring max_output_protected_frame_size value if
178  // present). Otherwise, it is based on peer and user specified max frame
179  // size (if present).
180  size_t max_frame_size = kTsiAltsMinFrameSize;
181  if (result->max_frame_size) {
182  size_t peer_max_frame_size = result->max_frame_size;
183  max_frame_size = std::min<size_t>(peer_max_frame_size,
184  max_output_protected_frame_size == nullptr
186  : *max_output_protected_frame_size);
187  max_frame_size = std::max<size_t>(max_frame_size, kTsiAltsMinFrameSize);
188  }
189  max_output_protected_frame_size = &max_frame_size;
191  "After Frame Size Negotiation, maximum frame size used by frame "
192  "protector equals %zu",
193  *max_output_protected_frame_size);
195  reinterpret_cast<const uint8_t*>(result->key_data),
196  kAltsAes128GcmRekeyKeyLength, /*is_rekey=*/true, result->is_client,
197  /*is_integrity_only=*/false, /*enable_extra_copy=*/false,
198  max_output_protected_frame_size, protector);
199  if (ok != TSI_OK) {
200  gpr_log(GPR_ERROR, "Failed to create zero-copy grpc protector");
201  }
202  return ok;
203 }
204 
206  const tsi_handshaker_result* self, size_t* max_output_protected_frame_size,
207  tsi_frame_protector** protector) {
208  if (self == nullptr || protector == nullptr) {
210  "Invalid arguments to handshaker_result_create_frame_protector()");
211  return TSI_INVALID_ARGUMENT;
212  }
214  reinterpret_cast<alts_tsi_handshaker_result*>(
215  const_cast<tsi_handshaker_result*>(self));
217  reinterpret_cast<const uint8_t*>(result->key_data),
218  kAltsAes128GcmRekeyKeyLength, result->is_client, /*is_rekey=*/true,
219  max_output_protected_frame_size, protector);
220  if (ok != TSI_OK) {
221  gpr_log(GPR_ERROR, "Failed to create frame protector");
222  }
223  return ok;
224 }
225 
227  const tsi_handshaker_result* self, const unsigned char** bytes,
228  size_t* bytes_size) {
229  if (self == nullptr || bytes == nullptr || bytes_size == nullptr) {
231  "Invalid arguments to handshaker_result_get_unused_bytes()");
232  return TSI_INVALID_ARGUMENT;
233  }
235  reinterpret_cast<alts_tsi_handshaker_result*>(
236  const_cast<tsi_handshaker_result*>(self));
237  *bytes = result->unused_bytes;
238  *bytes_size = result->unused_bytes_size;
239  return TSI_OK;
240 }
241 
243  if (self == nullptr) {
244  return;
245  }
247  reinterpret_cast<alts_tsi_handshaker_result*>(
248  const_cast<tsi_handshaker_result*>(self));
249  gpr_free(result->peer_identity);
250  gpr_free(result->key_data);
251  gpr_free(result->unused_bytes);
252  grpc_slice_unref_internal(result->rpc_versions);
253  grpc_slice_unref_internal(result->serialized_context);
254  gpr_free(result);
255 }
256 
264 
266  bool is_client,
268  if (result == nullptr || resp == nullptr) {
269  gpr_log(GPR_ERROR, "Invalid arguments to create_handshaker_result()");
270  return TSI_INVALID_ARGUMENT;
271  }
272  const grpc_gcp_HandshakerResult* hresult =
274  const grpc_gcp_Identity* identity =
276  if (identity == nullptr) {
277  gpr_log(GPR_ERROR, "Invalid identity");
279  }
280  upb_StringView peer_service_account =
282  if (peer_service_account.size == 0) {
283  gpr_log(GPR_ERROR, "Invalid peer service account");
285  }
287  if (key_data.size < kAltsAes128GcmRekeyKeyLength) {
288  gpr_log(GPR_ERROR, "Bad key length");
290  }
291  const grpc_gcp_RpcProtocolVersions* peer_rpc_version =
293  if (peer_rpc_version == nullptr) {
294  gpr_log(GPR_ERROR, "Peer does not set RPC protocol versions.");
296  }
297  upb_StringView application_protocol =
299  if (application_protocol.size == 0) {
300  gpr_log(GPR_ERROR, "Invalid application protocol");
302  }
303  upb_StringView record_protocol =
305  if (record_protocol.size == 0) {
306  gpr_log(GPR_ERROR, "Invalid record protocol");
308  }
309  const grpc_gcp_Identity* local_identity =
311  if (local_identity == nullptr) {
312  gpr_log(GPR_ERROR, "Invalid local identity");
314  }
315  upb_StringView local_service_account =
316  grpc_gcp_Identity_service_account(local_identity);
317  // We don't check if local service account is empty here
318  // because local identity could be empty in certain situations.
319  alts_tsi_handshaker_result* sresult =
320  grpc_core::Zalloc<alts_tsi_handshaker_result>();
321  sresult->key_data =
322  static_cast<char*>(gpr_zalloc(kAltsAes128GcmRekeyKeyLength));
323  memcpy(sresult->key_data, key_data.data, kAltsAes128GcmRekeyKeyLength);
324  sresult->peer_identity =
325  static_cast<char*>(gpr_zalloc(peer_service_account.size + 1));
326  memcpy(sresult->peer_identity, peer_service_account.data,
327  peer_service_account.size);
329  upb::Arena rpc_versions_arena;
330  bool serialized = grpc_gcp_rpc_protocol_versions_encode(
331  peer_rpc_version, rpc_versions_arena.ptr(), &sresult->rpc_versions);
332  if (!serialized) {
333  gpr_log(GPR_ERROR, "Failed to serialize peer's RPC protocol versions.");
335  }
336  upb::Arena context_arena;
340  // ALTS currently only supports the security level of 2,
341  // which is "grpc_gcp_INTEGRITY_AND_PRIVACY".
345  local_service_account);
347  context, const_cast<grpc_gcp_RpcProtocolVersions*>(peer_rpc_version));
348  grpc_gcp_Identity* peer_identity = const_cast<grpc_gcp_Identity*>(identity);
349  if (peer_identity == nullptr) {
350  gpr_log(GPR_ERROR, "Null peer identity in ALTS context.");
352  }
353  if (grpc_gcp_Identity_has_attributes(identity)) {
354  size_t iter = kUpb_Map_Begin;
355  grpc_gcp_Identity_AttributesEntry* peer_attributes_entry =
357  while (peer_attributes_entry != nullptr) {
360  peer_attributes_entry));
363  peer_attributes_entry));
365  context_arena.ptr());
366  peer_attributes_entry =
368  }
369  }
370  size_t serialized_ctx_length;
371  char* serialized_ctx = grpc_gcp_AltsContext_serialize(
372  context, context_arena.ptr(), &serialized_ctx_length);
373  if (serialized_ctx == nullptr) {
374  gpr_log(GPR_ERROR, "Failed to serialize peer's ALTS context.");
376  }
377  sresult->serialized_context =
378  grpc_slice_from_copied_buffer(serialized_ctx, serialized_ctx_length);
379  sresult->is_client = is_client;
380  sresult->base.vtable = &result_vtable;
381  *result = &sresult->base;
382  return TSI_OK;
383 }
384 
385 /* gRPC provided callback used when gRPC thread model is applied. */
389  if (client == nullptr) {
390  gpr_log(GPR_ERROR, "ALTS handshaker client is nullptr");
391  return;
392  }
393  bool success = true;
394  if (!GRPC_ERROR_IS_NONE(error)) {
396  "ALTS handshaker on_handshaker_service_resp_recv error: %s",
398  success = false;
399  }
401 }
402 
403 /* gRPC provided callback used when dedicatd CQ and thread are used.
404  * It serves to safely bring the control back to application. */
406  void* arg, grpc_error_handle /*error*/) {
410  resource->cq, arg, GRPC_ERROR_NONE,
411  [](void* /*done_arg*/, grpc_cq_completion* /*storage*/) {}, nullptr,
412  &resource->storage);
413 }
414 
415 /* Returns TSI_OK if and only if no error is encountered. */
417  alts_tsi_handshaker* handshaker, const unsigned char* received_bytes,
418  size_t received_bytes_size, tsi_handshaker_on_next_done_cb cb,
419  void* user_data) {
420  if (!handshaker->has_created_handshaker_client) {
421  if (handshaker->channel == nullptr) {
423  handshaker->handshaker_service_url);
424  handshaker->interested_parties =
426  GPR_ASSERT(handshaker->interested_parties != nullptr);
427  }
428  grpc_iomgr_cb_func grpc_cb = handshaker->channel == nullptr
432  handshaker->channel == nullptr
434  : handshaker->channel;
436  handshaker, channel, handshaker->handshaker_service_url,
437  handshaker->interested_parties, handshaker->options,
438  handshaker->target_name, grpc_cb, cb, user_data,
439  handshaker->client_vtable_for_testing, handshaker->is_client,
440  handshaker->max_frame_size);
441  if (client == nullptr) {
442  gpr_log(GPR_ERROR, "Failed to create ALTS handshaker client");
444  }
445  {
446  grpc_core::MutexLock lock(&handshaker->mu);
447  GPR_ASSERT(handshaker->client == nullptr);
448  handshaker->client = client;
449  if (handshaker->shutdown) {
450  gpr_log(GPR_INFO, "TSI handshake shutdown");
451  return TSI_HANDSHAKE_SHUTDOWN;
452  }
453  }
454  handshaker->has_created_handshaker_client = true;
455  }
456  if (handshaker->channel == nullptr &&
457  handshaker->client_vtable_for_testing == nullptr) {
459  handshaker->client));
460  }
461  grpc_slice slice = (received_bytes == nullptr || received_bytes_size == 0)
462  ? grpc_empty_slice()
464  reinterpret_cast<const char*>(received_bytes),
465  received_bytes_size);
466  tsi_result ok = TSI_OK;
467  if (!handshaker->has_sent_start_message) {
468  handshaker->has_sent_start_message = true;
469  ok = handshaker->is_client
472  // It's unsafe for the current thread to access any state in handshaker
473  // at this point, since alts_handshaker_client_start_client/server
474  // have potentially just started an op batch on the handshake call.
475  // The completion callback for that batch is unsynchronized and so
476  // can invoke the TSI next API callback from any thread, at which point
477  // there is nothing taking ownership of this handshaker to prevent it
478  // from being destroyed.
479  } else {
480  ok = alts_handshaker_client_next(handshaker->client, &slice);
481  }
483  return ok;
484 }
485 
488  std::unique_ptr<unsigned char> received_bytes;
491  void* user_data;
493 };
494 
496  void* arg, grpc_error_handle /* unused_error */) {
499  alts_tsi_handshaker* handshaker = next_args->handshaker;
500  GPR_ASSERT(handshaker->channel == nullptr);
502  // Disable retries so that we quickly get a signal when the
503  // handshake server is not reachable.
504  grpc_arg disable_retries_arg = grpc_channel_arg_integer_create(
505  const_cast<char*>(GRPC_ARG_ENABLE_RETRIES), 0);
506  grpc_channel_args args = {1, &disable_retries_arg};
507  handshaker->channel = grpc_channel_create(
508  next_args->handshaker->handshaker_service_url, creds, &args);
510  tsi_result continue_next_result =
512  handshaker, next_args->received_bytes.get(),
513  next_args->received_bytes_size, next_args->cb, next_args->user_data);
514  if (continue_next_result != TSI_OK) {
515  next_args->cb(continue_next_result, next_args->user_data, nullptr, 0,
516  nullptr);
517  }
518  delete next_args;
519 }
520 
522  tsi_handshaker* self, const unsigned char* received_bytes,
523  size_t received_bytes_size, const unsigned char** /*bytes_to_send*/,
524  size_t* /*bytes_to_send_size*/, tsi_handshaker_result** /*result*/,
525  tsi_handshaker_on_next_done_cb cb, void* user_data) {
526  if (self == nullptr || cb == nullptr) {
527  gpr_log(GPR_ERROR, "Invalid arguments to handshaker_next()");
528  return TSI_INVALID_ARGUMENT;
529  }
530  alts_tsi_handshaker* handshaker =
531  reinterpret_cast<alts_tsi_handshaker*>(self);
532  {
533  grpc_core::MutexLock lock(&handshaker->mu);
534  if (handshaker->shutdown) {
535  gpr_log(GPR_INFO, "TSI handshake shutdown");
536  return TSI_HANDSHAKE_SHUTDOWN;
537  }
538  }
539  if (handshaker->channel == nullptr && !handshaker->use_dedicated_cq) {
542  args->handshaker = handshaker;
543  args->received_bytes = nullptr;
544  args->received_bytes_size = received_bytes_size;
545  if (received_bytes_size > 0) {
546  args->received_bytes = std::unique_ptr<unsigned char>(
547  static_cast<unsigned char*>(gpr_zalloc(received_bytes_size)));
548  memcpy(args->received_bytes.get(), received_bytes, received_bytes_size);
549  }
550  args->cb = cb;
551  args->user_data = user_data;
553  grpc_schedule_on_exec_ctx);
554  // We continue this handshaker_next call at the bottom of the ExecCtx just
555  // so that we can invoke grpc_channel_create at the bottom of the call
556  // stack. Doing so avoids potential lock cycles between g_init_mu and other
557  // mutexes within core that might be held on the current call stack
558  // (note that g_init_mu gets acquired during channel creation).
560  } else {
562  handshaker, received_bytes, received_bytes_size, cb, user_data);
563  if (ok != TSI_OK) {
564  gpr_log(GPR_ERROR, "Failed to schedule ALTS handshaker requests");
565  return ok;
566  }
567  }
568  return TSI_ASYNC;
569 }
570 
571 /*
572  * This API will be invoked by a non-gRPC application, and an ExecCtx needs
573  * to be explicitly created in order to invoke ALTS handshaker client API's
574  * that assumes the caller is inside gRPC core.
575  */
577  tsi_handshaker* self, const unsigned char* received_bytes,
578  size_t received_bytes_size, const unsigned char** bytes_to_send,
579  size_t* bytes_to_send_size, tsi_handshaker_result** result,
580  tsi_handshaker_on_next_done_cb cb, void* user_data) {
582  return handshaker_next(self, received_bytes, received_bytes_size,
583  bytes_to_send, bytes_to_send_size, result, cb,
584  user_data);
585 }
586 
588  GPR_ASSERT(self != nullptr);
589  alts_tsi_handshaker* handshaker =
590  reinterpret_cast<alts_tsi_handshaker*>(self);
591  grpc_core::MutexLock lock(&handshaker->mu);
592  if (handshaker->shutdown) {
593  return;
594  }
595  if (handshaker->client != nullptr) {
597  }
598  handshaker->shutdown = true;
599 }
600 
601 static void handshaker_destroy(tsi_handshaker* self) {
602  if (self == nullptr) {
603  return;
604  }
605  alts_tsi_handshaker* handshaker =
606  reinterpret_cast<alts_tsi_handshaker*>(self);
610  if (handshaker->channel != nullptr) {
612  }
613  gpr_free(handshaker->handshaker_service_url);
614  delete handshaker;
615 }
616 
618  nullptr, nullptr,
619  nullptr, nullptr,
620  nullptr, handshaker_destroy,
622 
624  nullptr,
625  nullptr,
626  nullptr,
627  nullptr,
628  nullptr,
632 
634  GPR_ASSERT(handshaker != nullptr);
635  grpc_core::MutexLock lock(&handshaker->mu);
636  return handshaker->shutdown;
637 }
638 
640  const grpc_alts_credentials_options* options, const char* target_name,
641  const char* handshaker_service_url, bool is_client,
642  grpc_pollset_set* interested_parties, tsi_handshaker** self,
643  size_t user_specified_max_frame_size) {
644  if (handshaker_service_url == nullptr || self == nullptr ||
645  options == nullptr || (is_client && target_name == nullptr)) {
646  gpr_log(GPR_ERROR, "Invalid arguments to alts_tsi_handshaker_create()");
647  return TSI_INVALID_ARGUMENT;
648  }
649  bool use_dedicated_cq = interested_parties == nullptr;
650  alts_tsi_handshaker* handshaker = new alts_tsi_handshaker();
651  memset(&handshaker->base, 0, sizeof(handshaker->base));
652  handshaker->base.vtable =
653  use_dedicated_cq ? &handshaker_vtable_dedicated : &handshaker_vtable;
654  handshaker->target_name = target_name == nullptr
655  ? grpc_empty_slice()
656  : grpc_slice_from_static_string(target_name);
657  handshaker->is_client = is_client;
658  handshaker->handshaker_service_url = gpr_strdup(handshaker_service_url);
659  handshaker->interested_parties = interested_parties;
661  handshaker->use_dedicated_cq = use_dedicated_cq;
662  handshaker->max_frame_size = user_specified_max_frame_size != 0
663  ? user_specified_max_frame_size
665  *self = &handshaker->base;
666  return TSI_OK;
667 }
668 
670  grpc_slice* recv_bytes,
671  size_t bytes_consumed) {
672  GPR_ASSERT(recv_bytes != nullptr && result != nullptr);
673  if (GRPC_SLICE_LENGTH(*recv_bytes) == bytes_consumed) {
674  return;
675  }
676  alts_tsi_handshaker_result* sresult =
677  reinterpret_cast<alts_tsi_handshaker_result*>(result);
678  sresult->unused_bytes_size = GRPC_SLICE_LENGTH(*recv_bytes) - bytes_consumed;
679  sresult->unused_bytes =
680  static_cast<unsigned char*>(gpr_zalloc(sresult->unused_bytes_size));
681  memcpy(sresult->unused_bytes,
682  GRPC_SLICE_START_PTR(*recv_bytes) + bytes_consumed,
683  sresult->unused_bytes_size);
684 }
685 
686 namespace grpc_core {
687 namespace internal {
688 
690  alts_tsi_handshaker* handshaker) {
691  GPR_ASSERT(handshaker != nullptr);
692  return handshaker->has_sent_start_message;
693 }
694 
697  GPR_ASSERT(handshaker != nullptr);
698  handshaker->client_vtable_for_testing = vtable;
699 }
700 
702  alts_tsi_handshaker* handshaker) {
703  GPR_ASSERT(handshaker != nullptr);
704  return handshaker->is_client;
705 }
706 
708  alts_tsi_handshaker* handshaker) {
709  return handshaker->client;
710 }
711 
712 } // namespace internal
713 } // namespace grpc_core
alts_tsi_handshaker_continue_handshaker_next_args
Definition: alts_tsi_handshaker.cc:486
grpc_gcp_HandshakerResp_result
const UPB_INLINE grpc_gcp_HandshakerResult * grpc_gcp_HandshakerResp_result(const grpc_gcp_HandshakerResp *msg)
Definition: handshaker.upb.h:1079
GRPC_CLOSURE_INIT
#define GRPC_CLOSURE_INIT(closure, cb, cb_arg, scheduler)
Definition: closure.h:115
grpc_arg
Definition: grpc_types.h:103
tsi_security_level_to_string
const char * tsi_security_level_to_string(tsi_security_level security_level)
Definition: transport_security.cc:70
alts_tsi_handshaker::handshaker_service_url
char * handshaker_service_url
Definition: alts_tsi_handshaker.cc:55
alts_handshaker_client_start_server
tsi_result alts_handshaker_client_start_server(alts_handshaker_client *client, grpc_slice *bytes_received)
Definition: alts_handshaker_client.cc:873
grpc_alts_get_shared_resource_dedicated
alts_shared_resource_dedicated * grpc_alts_get_shared_resource_dedicated(void)
Definition: alts_shared_resource.cc:30
grpc_alts_credentials_options_destroy
GRPCAPI void grpc_alts_credentials_options_destroy(grpc_alts_credentials_options *options)
Definition: grpc_alts_credentials_options.cc:38
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
GPR_INFO
#define GPR_INFO
Definition: include/grpc/impl/codegen/log.h:56
tsi_handshaker::vtable
const tsi_handshaker_vtable * vtable
Definition: transport_security.h:85
alts_tsi_handshaker_result::max_frame_size
size_t max_frame_size
Definition: alts_tsi_handshaker.cc:85
grpc_gcp_Identity_service_account
UPB_INLINE upb_StringView grpc_gcp_Identity_service_account(const grpc_gcp_Identity *msg)
Definition: handshaker.upb.h:181
alts_tsi_handshaker::client
alts_handshaker_client * client
Definition: alts_tsi_handshaker.cc:66
vtable
static const grpc_transport_vtable vtable
Definition: binder_transport.cc:680
GRPC_ERROR_NONE
#define GRPC_ERROR_NONE
Definition: error.h:234
log.h
on_handshaker_service_resp_recv
static void on_handshaker_service_resp_recv(void *arg, grpc_error_handle error)
Definition: alts_tsi_handshaker.cc:386
tsi_peer::properties
tsi_peer_property * properties
Definition: transport_security_interface.h:239
on_handshaker_service_resp_recv_dedicated
static void on_handshaker_service_resp_recv_dedicated(void *arg, grpc_error_handle)
Definition: alts_tsi_handshaker.cc:405
grpc_gcp_AltsContext_set_security_level
UPB_INLINE void grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext *msg, int32_t value)
Definition: altscontext.upb.h:126
grpc_gcp_Identity_AttributesEntry
struct grpc_gcp_Identity_AttributesEntry grpc_gcp_Identity_AttributesEntry
Definition: handshaker.upb.h:37
alts_create_frame_protector
tsi_result alts_create_frame_protector(const uint8_t *key, size_t key_size, bool is_client, bool is_rekey, size_t *max_protected_frame_size, tsi_frame_protector **self)
Definition: alts_frame_protector.cc:363
kUpb_Map_Begin
#define kUpb_Map_Begin
Definition: upb/upb/upb.h:329
memset
return memset(p, 0, total)
grpc_gcp_Identity_AttributesEntry_key
UPB_INLINE upb_StringView grpc_gcp_Identity_AttributesEntry_key(const grpc_gcp_Identity_AttributesEntry *msg)
Definition: handshaker.upb.h:228
tsi_handshaker_vtable
Definition: transport_security.h:57
alts_tsi_handshaker
Definition: alts_tsi_handshaker.cc:49
grpc_gcp_HandshakerResult_key_data
UPB_INLINE upb_StringView grpc_gcp_HandshakerResult_key_data(const grpc_gcp_HandshakerResult *msg)
Definition: handshaker.upb.h:881
tsi_handshaker
Definition: transport_security.h:84
grpc_core
Definition: call_metric_recorder.h:31
alts_tsi_handshaker::mu
grpc_core::Mutex mu
Definition: alts_tsi_handshaker.cc:65
TSI_SECURITY_LEVEL_PEER_PROPERTY
#define TSI_SECURITY_LEVEL_PEER_PROPERTY
Definition: transport_security_interface.h:226
upb_StringView::data
const char * data
Definition: upb/upb/upb.h:73
client
Definition: examples/python/async_streaming/client.py:1
alts_tsi_handshaker.h
grpc_core::MutexLock
Definition: src/core/lib/gprpp/sync.h:88
grpc_pollset_set
struct grpc_pollset_set grpc_pollset_set
Definition: iomgr_fwd.h:23
string.h
options
double_dict options[]
Definition: capstone_test.c:55
alts_tsi_handshaker::has_created_handshaker_client
bool has_created_handshaker_client
Definition: alts_tsi_handshaker.cc:54
alts_shared_resource_dedicated::channel
grpc_channel * channel
Definition: alts_shared_resource.h:41
grpc_gcp_HandshakerResult_record_protocol
UPB_INLINE upb_StringView grpc_gcp_HandshakerResult_record_protocol(const grpc_gcp_HandshakerResult *msg)
Definition: handshaker.upb.h:875
gpr_free
GPRAPI void gpr_free(void *ptr)
Definition: alloc.cc:51
error
grpc_error_handle error
Definition: retry_filter.cc:499
grpc_gcp_HandshakerResult_peer_identity
const UPB_INLINE grpc_gcp_Identity * grpc_gcp_HandshakerResult_peer_identity(const grpc_gcp_HandshakerResult *msg)
Definition: handshaker.upb.h:890
alts_handshaker_client_vtable
Definition: alts_handshaker_client.h:54
grpc_gcp_AltsContext_new
UPB_INLINE grpc_gcp_AltsContext * grpc_gcp_AltsContext_new(upb_Arena *arena)
Definition: altscontext.upb.h:36
alts_tsi_handshaker::is_client
bool is_client
Definition: alts_tsi_handshaker.cc:52
closure.h
grpc_cq_completion
Definition: src/core/lib/surface/completion_queue.h:43
kTsiAltsNumOfPeerProperties
const size_t kTsiAltsNumOfPeerProperties
Definition: alts_tsi_handshaker.h:39
grpc_gcp_HandshakerResult_application_protocol
UPB_INLINE upb_StringView grpc_gcp_HandshakerResult_application_protocol(const grpc_gcp_HandshakerResult *msg)
Definition: handshaker.upb.h:869
grpc_cq_end_op
void grpc_cq_end_op(grpc_completion_queue *cq, void *tag, grpc_error_handle error, void(*done)(void *done_arg, grpc_cq_completion *storage), void *done_arg, grpc_cq_completion *storage, bool internal)
Definition: completion_queue.cc:894
thd_id.h
grpc_gcp_HandshakerResult_max_frame_size
UPB_INLINE uint32_t grpc_gcp_HandshakerResult_max_frame_size(const grpc_gcp_HandshakerResult *msg)
Definition: handshaker.upb.h:920
alts_tsi_handshaker_result::peer_identity
char * peer_identity
Definition: alts_tsi_handshaker.cc:77
alts_tsi_handshaker_result::unused_bytes
unsigned char * unused_bytes
Definition: alts_tsi_handshaker.cc:79
TSI_FAILED_PRECONDITION
@ TSI_FAILED_PRECONDITION
Definition: transport_security_interface.h:37
grpc_security.h
TSI_HANDSHAKE_SHUTDOWN
@ TSI_HANDSHAKE_SHUTDOWN
Definition: transport_security_interface.h:46
grpc_gcp_Identity_AttributesEntry_value
UPB_INLINE upb_StringView grpc_gcp_Identity_AttributesEntry_value(const grpc_gcp_Identity_AttributesEntry *msg)
Definition: handshaker.upb.h:233
alts_tsi_handshaker_continue_handshaker_next
static tsi_result alts_tsi_handshaker_continue_handshaker_next(alts_tsi_handshaker *handshaker, const unsigned char *received_bytes, size_t received_bytes_size, tsi_handshaker_on_next_done_cb cb, void *user_data)
Definition: alts_tsi_handshaker.cc:416
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
grpc_channel_args
Definition: grpc_types.h:132
handshaker_vtable
static const tsi_handshaker_vtable handshaker_vtable
Definition: alts_tsi_handshaker.cc:617
alts_grpc_handshaker_client_create
alts_handshaker_client * alts_grpc_handshaker_client_create(alts_tsi_handshaker *handshaker, grpc_channel *channel, const char *handshaker_service_url, grpc_pollset_set *interested_parties, grpc_alts_credentials_options *options, const grpc_slice &target_name, grpc_iomgr_cb_func grpc_cb, tsi_handshaker_on_next_done_cb cb, void *user_data, alts_handshaker_client_vtable *vtable_for_testing, bool is_client, size_t max_frame_size)
Definition: alts_handshaker_client.cc:687
alts_handshaker_client_handle_response
void alts_handshaker_client_handle_response(alts_handshaker_client *c, bool is_ok)
Definition: alts_handshaker_client.cc:190
grpc_channel_destroy_internal
void grpc_channel_destroy_internal(grpc_channel *c_channel)
Definition: channel.cc:425
grpc_gcp_rpc_protocol_versions_encode
bool grpc_gcp_rpc_protocol_versions_encode(const grpc_gcp_rpc_protocol_versions *versions, grpc_slice *slice)
Definition: transport_security_common_api.cc:53
grpc_gcp_Identity_attributes_nextmutable
UPB_INLINE grpc_gcp_Identity_AttributesEntry * grpc_gcp_Identity_attributes_nextmutable(grpc_gcp_Identity *msg, size_t *iter)
Definition: handshaker.upb.h:222
gpr_zalloc
GPRAPI void * gpr_zalloc(size_t size)
Definition: alloc.cc:40
client
static uv_tcp_t client
Definition: test-callback-stack.c:33
alts_tsi_handshaker_result
struct alts_tsi_handshaker_result alts_tsi_handshaker_result
alts_tsi_handshaker::target_name
grpc_slice target_name
Definition: alts_tsi_handshaker.cc:51
memory.h
alts_shared_resource_dedicated::storage
grpc_cq_completion storage
Definition: alts_shared_resource.h:39
alts_handshaker_client_shutdown
void alts_handshaker_client_shutdown(alts_handshaker_client *client)
Definition: alts_handshaker_client.cc:895
grpc_gcp_Identity_has_attributes
UPB_INLINE bool grpc_gcp_Identity_has_attributes(const grpc_gcp_Identity *msg)
Definition: handshaker.upb.h:193
GRPC_ARG_ENABLE_RETRIES
#define GRPC_ARG_ENABLE_RETRIES
Definition: grpc_types.h:396
TSI_OK
@ TSI_OK
Definition: transport_security_interface.h:32
alts_tsi_handshaker::has_sent_start_message
bool has_sent_start_message
Definition: alts_tsi_handshaker.cc:53
DEBUG_LOCATION
#define DEBUG_LOCATION
Definition: debug_location.h:41
handshaker_next
static tsi_result handshaker_next(tsi_handshaker *self, const unsigned char *received_bytes, size_t received_bytes_size, const unsigned char **, size_t *, tsi_handshaker_result **, tsi_handshaker_on_next_done_cb cb, void *user_data)
Definition: alts_tsi_handshaker.cc:521
string_util.h
tsi_handshaker_result::vtable
const tsi_handshaker_result_vtable * vtable
Definition: transport_security.h:122
memcpy
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
alts_shared_resource_dedicated::interested_parties
grpc_pollset_set * interested_parties
Definition: alts_shared_resource.h:38
handshaker_result_destroy
static void handshaker_result_destroy(tsi_handshaker_result *self)
Definition: alts_tsi_handshaker.cc:242
alts_handshaker_client.h
channel
wrapped_grpc_channel * channel
Definition: src/php/ext/grpc/call.h:33
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
tsi_frame_protector_type
tsi_frame_protector_type
Definition: transport_security_interface.h:69
GPR_ASSERT
#define GPR_ASSERT(x)
Definition: include/grpc/impl/codegen/log.h:94
grpc_gcp_HandshakerResp
struct grpc_gcp_HandshakerResp grpc_gcp_HandshakerResp
Definition: handshaker.upb.h:46
kAltsAes128GcmRekeyKeyLength
const size_t kAltsAes128GcmRekeyKeyLength
Definition: alts_handshaker_client.h:38
gen_stats_data.c_str
def c_str(s, encoding='ascii')
Definition: gen_stats_data.py:38
upb_StringView::size
size_t size
Definition: upb/upb/upb.h:74
handshaker_shutdown
static void handshaker_shutdown(tsi_handshaker *self)
Definition: alts_tsi_handshaker.cc:587
TSI_ALTS_SERVICE_ACCOUNT_PEER_PROPERTY
#define TSI_ALTS_SERVICE_ACCOUNT_PEER_PROPERTY
Definition: alts_tsi_handshaker.h:34
grpc_alts_shared_resource_dedicated_start
void grpc_alts_shared_resource_dedicated_start(const char *handshaker_service_url)
Definition: alts_shared_resource.cc:55
alts_tsi_handshaker::interested_parties
grpc_pollset_set * interested_parties
Definition: alts_tsi_handshaker.cc:56
slice
grpc_slice slice
Definition: src/core/lib/surface/server.cc:467
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
alts_handshaker_client_start_client
tsi_result alts_handshaker_client_start_client(alts_handshaker_client *client)
Definition: alts_handshaker_client.cc:863
http2_server_health_check.resp
resp
Definition: http2_server_health_check.py:31
handshaker_destroy
static void handshaker_destroy(tsi_handshaker *self)
Definition: alts_tsi_handshaker.cc:601
alts_frame_protector.h
TSI_ALTS_RPC_VERSIONS
#define TSI_ALTS_RPC_VERSIONS
Definition: alts_tsi_handshaker.h:36
tsi_handshaker_on_next_done_cb
void(* tsi_handshaker_on_next_done_cb)(tsi_result status, void *user_data, const unsigned char *bytes_to_send, size_t bytes_to_send_size, tsi_handshaker_result *handshaker_result)
Definition: transport_security_interface.h:462
grpc_gcp_HandshakerResult_peer_rpc_versions
UPB_INLINE const struct grpc_gcp_RpcProtocolVersions * grpc_gcp_HandshakerResult_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg)
Definition: handshaker.upb.h:914
tsi_result
tsi_result
Definition: transport_security_interface.h:31
grpc_insecure_credentials_create
GRPCAPI grpc_channel_credentials * grpc_insecure_credentials_create()
Definition: core/lib/security/credentials/insecure/insecure_credentials.cc:64
alts_tsi_handshaker_result_set_unused_bytes
void alts_tsi_handshaker_result_set_unused_bytes(tsi_handshaker_result *result, grpc_slice *recv_bytes, size_t bytes_consumed)
Definition: alts_tsi_handshaker.cc:669
GRPC_SLICE_START_PTR
#define GRPC_SLICE_START_PTR(slice)
Definition: include/grpc/impl/codegen/slice.h:101
alts_tsi_handshaker_result::serialized_context
grpc_slice serialized_context
Definition: alts_tsi_handshaker.cc:83
grpc_gcp_AltsContext_set_peer_rpc_versions
UPB_INLINE void grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext *msg, struct grpc_gcp_RpcProtocolVersions *value)
Definition: altscontext.upb.h:135
alts_tsi_handshaker_result::is_client
bool is_client
Definition: alts_tsi_handshaker.cc:82
alts_tsi_handshaker_continue_handshaker_next_args::received_bytes
std::unique_ptr< unsigned char > received_bytes
Definition: alts_tsi_handshaker.cc:488
arg
Definition: cmdline.cc:40
grpc_slice_from_static_string
GPRAPI grpc_slice grpc_slice_from_static_string(const char *source)
Definition: slice/slice.cc:89
grpc_gcp_AltsContext
struct grpc_gcp_AltsContext grpc_gcp_AltsContext
Definition: altscontext.upb.h:25
alts_tsi_handshaker_create_channel
static void alts_tsi_handshaker_create_channel(void *arg, grpc_error_handle)
Definition: alts_tsi_handshaker.cc:495
alts_zero_copy_grpc_protector_create
tsi_result alts_zero_copy_grpc_protector_create(const uint8_t *key, size_t key_size, bool is_rekey, bool is_client, bool is_integrity_only, bool enable_extra_copy, size_t *max_protected_frame_size, tsi_zero_copy_grpc_protector **protector)
Definition: alts_zero_copy_grpc_protector.cc:260
grpc_empty_slice
GPRAPI grpc_slice grpc_empty_slice(void)
Definition: slice/slice.cc:42
grpc_slice
Definition: include/grpc/impl/codegen/slice.h:65
alts_tsi_handshaker::channel
grpc_channel * channel
Definition: alts_tsi_handshaker.cc:59
grpc_core::internal::alts_tsi_handshaker_get_is_client_for_testing
bool alts_tsi_handshaker_get_is_client_for_testing(alts_tsi_handshaker *handshaker)
Definition: alts_tsi_handshaker.cc:701
alts_handshaker_client
Definition: alts_handshaker_client.cc:43
alts_shared_resource.h
alts_handshaker_client_next
tsi_result alts_handshaker_client_next(alts_handshaker_client *client, grpc_slice *bytes_received)
Definition: alts_handshaker_client.cc:884
grpc_gcp_AltsContext_peer_attributes_set
UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_set(grpc_gcp_AltsContext *msg, upb_StringView key, upb_StringView val, upb_Arena *a)
Definition: altscontext.upb.h:149
alts_tsi_handshaker_continue_handshaker_next_args::cb
tsi_handshaker_on_next_done_cb cb
Definition: alts_tsi_handshaker.cc:490
slice_internal.h
GPR_ERROR
#define GPR_ERROR
Definition: include/grpc/impl/codegen/log.h:57
alts_tsi_handshaker::client_vtable_for_testing
alts_handshaker_client_vtable * client_vtable_for_testing
Definition: alts_tsi_handshaker.cc:58
alts_shared_resource_dedicated
Definition: alts_shared_resource.h:35
grpc_gcp_RpcProtocolVersions
struct grpc_gcp_RpcProtocolVersions grpc_gcp_RpcProtocolVersions
Definition: transport_security_common.upb.h:25
TSI_ALTS_CERTIFICATE_TYPE
#define TSI_ALTS_CERTIFICATE_TYPE
Definition: alts_tsi_handshaker.h:35
grpc_core::ExecCtx
Definition: exec_ctx.h:97
grpc_core::internal::alts_tsi_handshaker_get_has_sent_start_message_for_testing
bool alts_tsi_handshaker_get_has_sent_start_message_for_testing(alts_tsi_handshaker *handshaker)
Definition: alts_tsi_handshaker.cc:689
alts_tsi_handshaker_create
tsi_result alts_tsi_handshaker_create(const grpc_alts_credentials_options *options, const char *target_name, const char *handshaker_service_url, bool is_client, grpc_pollset_set *interested_parties, tsi_handshaker **self, size_t user_specified_max_frame_size)
Definition: alts_tsi_handshaker.cc:639
alts_tsi_handshaker::max_frame_size
size_t max_frame_size
Definition: alts_tsi_handshaker.cc:71
GRPC_SLICE_LENGTH
#define GRPC_SLICE_LENGTH(slice)
Definition: include/grpc/impl/codegen/slice.h:104
alts_zero_copy_grpc_protector.h
grpc_gcp_AltsContext_serialize
UPB_INLINE char * grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext *msg, upb_Arena *arena, size_t *len)
Definition: altscontext.upb.h:58
alts_tsi_handshaker_result_create
tsi_result alts_tsi_handshaker_result_create(grpc_gcp_HandshakerResp *resp, bool is_client, tsi_handshaker_result **result)
Definition: alts_tsi_handshaker.cc:265
grpc_gcp_AltsContext_set_peer_service_account
UPB_INLINE void grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext *msg, upb_StringView value)
Definition: altscontext.upb.h:129
alts_tsi_handshaker_continue_handshaker_next_args::user_data
void * user_data
Definition: alts_tsi_handshaker.cc:491
kTsiAltsMinFrameSize
const size_t kTsiAltsMinFrameSize
Definition: alts_tsi_handshaker.h:43
grpc_channel_credentials_release
GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds)
Definition: credentials.cc:36
upb::Arena::ptr
upb_Arena * ptr()
Definition: upb.hpp:76
handshaker_result_get_frame_protector_type
static tsi_result handshaker_result_get_frame_protector_type(const tsi_handshaker_result *, tsi_frame_protector_type *frame_protector_type)
Definition: alts_tsi_handshaker.cc:156
handshaker_vtable_dedicated
static const tsi_handshaker_vtable handshaker_vtable_dedicated
Definition: alts_tsi_handshaker.cc:623
tsi_peer
Definition: transport_security_interface.h:238
grpc_alts_credentials_options
Definition: grpc_alts_credentials_options.h:35
grpc_cq_begin_op
bool grpc_cq_begin_op(grpc_completion_queue *cq, void *tag)
Definition: completion_queue.cc:672
grpc_core::Mutex
Definition: src/core/lib/gprpp/sync.h:61
upb::Arena
Definition: upb.hpp:68
grpc_channel_create
GRPCAPI grpc_channel * grpc_channel_create(const char *target, grpc_channel_credentials *creds, const grpc_channel_args *args)
Definition: chttp2_connector.cc:366
grpc_gcp_Identity
struct grpc_gcp_Identity grpc_gcp_Identity
Definition: handshaker.upb.h:36
grpc_alts_credentials_options_copy
grpc_alts_credentials_options * grpc_alts_credentials_options_copy(const grpc_alts_credentials_options *options)
Definition: grpc_alts_credentials_options.cc:26
grpc_slice_from_copied_buffer
GPRAPI grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len)
Definition: slice/slice.cc:170
alts_tsi_utils.h
key
const char * key
Definition: hpack_parser_table.cc:164
handshaker_next_dedicated
static tsi_result handshaker_next_dedicated(tsi_handshaker *self, const unsigned char *received_bytes, size_t received_bytes_size, const unsigned char **bytes_to_send, size_t *bytes_to_send_size, tsi_handshaker_result **result, tsi_handshaker_on_next_done_cb cb, void *user_data)
Definition: alts_tsi_handshaker.cc:576
upb_StringView
Definition: upb/upb/upb.h:72
grpc_channel_arg_integer_create
grpc_arg grpc_channel_arg_integer_create(char *name, int value)
Definition: channel_args.cc:484
alts_tsi_handshaker_result::rpc_versions
grpc_slice rpc_versions
Definition: alts_tsi_handshaker.cc:81
bytes
uint8 bytes[10]
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/coded_stream_unittest.cc:153
kTsiAltsMaxFrameSize
const size_t kTsiAltsMaxFrameSize
Definition: alts_tsi_handshaker.h:44
alts_handshaker_client_destroy
void alts_handshaker_client_destroy(alts_handshaker_client *c)
Definition: alts_handshaker_client.cc:902
upb.hpp
TSI_ASYNC
@ TSI_ASYNC
Definition: transport_security_interface.h:45
exec_ctx
grpc_core::ExecCtx exec_ctx
Definition: end2end_binder_transport_test.cc:75
grpc_error_std_string
std::string grpc_error_std_string(grpc_error_handle error)
Definition: error.cc:944
grpc_gcp_AltsContext_set_local_service_account
UPB_INLINE void grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsContext *msg, upb_StringView value)
Definition: altscontext.upb.h:132
alts_tsi_handshaker::shutdown
bool shutdown
Definition: alts_tsi_handshaker.cc:69
alts_tsi_handshaker_continue_handshaker_next_args::handshaker
alts_tsi_handshaker * handshaker
Definition: alts_tsi_handshaker.cc:487
index
int index
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:1184
alts_tsi_handshaker_has_shutdown
bool alts_tsi_handshaker_has_shutdown(alts_tsi_handshaker *handshaker)
Definition: alts_tsi_handshaker.cc:633
alloc.h
handshaker_result_create_frame_protector
static tsi_result handshaker_result_create_frame_protector(const tsi_handshaker_result *self, size_t *max_output_protected_frame_size, tsi_frame_protector **protector)
Definition: alts_tsi_handshaker.cc:205
grpc_iomgr_cb_func
void(* grpc_iomgr_cb_func)(void *arg, grpc_error_handle error)
Definition: closure.h:53
grpc_gcp_HandshakerResult
struct grpc_gcp_HandshakerResult grpc_gcp_HandshakerResult
Definition: handshaker.upb.h:44
thd.h
alts_tsi_handshaker_result::unused_bytes_size
size_t unused_bytes_size
Definition: alts_tsi_handshaker.cc:80
alts_tsi_handshaker::options
grpc_alts_credentials_options * options
Definition: alts_tsi_handshaker.cc:57
TSI_INVALID_ARGUMENT
@ TSI_INVALID_ARGUMENT
Definition: transport_security_interface.h:34
ok
bool ok
Definition: async_end2end_test.cc:197
arg
struct arg arg
grpc_core::ExecCtx::Run
static void Run(const DebugLocation &location, grpc_closure *closure, grpc_error_handle error)
Definition: exec_ctx.cc:98
grpc_channel
struct grpc_channel grpc_channel
Definition: grpc_types.h:62
alts_tsi_handshaker_continue_handshaker_next_args::closure
grpc_closure closure
Definition: alts_tsi_handshaker.cc:492
alts_shared_resource_dedicated::cq
grpc_completion_queue * cq
Definition: alts_shared_resource.h:37
handshaker_result_create_zero_copy_grpc_protector
static tsi_result handshaker_result_create_zero_copy_grpc_protector(const tsi_handshaker_result *self, size_t *max_output_protected_frame_size, tsi_zero_copy_grpc_protector **protector)
Definition: alts_tsi_handshaker.cc:163
alts_tsi_handshaker::base
tsi_handshaker base
Definition: alts_tsi_handshaker.cc:50
tsi_handshaker_result
Definition: transport_security.h:121
alts_tsi_handshaker_result::base
tsi_handshaker_result base
Definition: alts_tsi_handshaker.cc:76
grpc_core::internal::alts_tsi_handshaker_set_client_vtable_for_testing
void alts_tsi_handshaker_set_client_vtable_for_testing(alts_tsi_handshaker *handshaker, alts_handshaker_client_vtable *vtable)
Definition: alts_tsi_handshaker.cc:695
gpr_strdup
GPRAPI char * gpr_strdup(const char *src)
Definition: string.cc:39
GPR_DEBUG
#define GPR_DEBUG
Definition: include/grpc/impl/codegen/log.h:55
alts_tsi_handshaker_result::key_data
char * key_data
Definition: alts_tsi_handshaker.cc:78
handshaker_result_extract_peer
static tsi_result handshaker_result_extract_peer(const tsi_handshaker_result *self, tsi_peer *peer)
Definition: alts_tsi_handshaker.cc:88
internal
Definition: benchmark/test/output_test_helper.cc:20
alts_tsi_handshaker_continue_handshaker_next_args::received_bytes_size
size_t received_bytes_size
Definition: alts_tsi_handshaker.cc:489
handshaker_result_get_unused_bytes
static tsi_result handshaker_result_get_unused_bytes(const tsi_handshaker_result *self, const unsigned char **bytes, size_t *bytes_size)
Definition: alts_tsi_handshaker.cc:226
TSI_PRIVACY_AND_INTEGRITY
@ TSI_PRIVACY_AND_INTEGRITY
Definition: transport_security_interface.h:56
context
grpc::ClientContext context
Definition: istio_echo_server_lib.cc:61
TSI_FRAME_PROTECTOR_NORMAL_OR_ZERO_COPY
@ TSI_FRAME_PROTECTOR_NORMAL_OR_ZERO_COPY
Definition: transport_security_interface.h:83
iter
Definition: test_winkernel.cpp:47
tsi_frame_protector
Definition: transport_security.h:51
grpc_core::internal::alts_tsi_handshaker_get_client_for_testing
alts_handshaker_client * alts_tsi_handshaker_get_client_for_testing(alts_tsi_handshaker *handshaker)
Definition: alts_tsi_handshaker.cc:707
tsi_zero_copy_grpc_protector
Definition: transport_security_grpc.h:79
TSI_CERTIFICATE_TYPE_PEER_PROPERTY
#define TSI_CERTIFICATE_TYPE_PEER_PROPERTY
Definition: transport_security_interface.h:223
grpc_gcp_HandshakerResult_local_identity
const UPB_INLINE grpc_gcp_Identity * grpc_gcp_HandshakerResult_local_identity(const grpc_gcp_HandshakerResult *msg)
Definition: handshaker.upb.h:899
TSI_ALTS_CONTEXT
#define TSI_ALTS_CONTEXT
Definition: alts_tsi_handshaker.h:37
alts_tsi_handshaker::use_dedicated_cq
bool use_dedicated_cq
Definition: alts_tsi_handshaker.cc:60
tsi_handshaker_result_vtable
Definition: transport_security.h:100
grpc_error
Definition: error_internal.h:42
result_vtable
static const tsi_handshaker_result_vtable result_vtable
Definition: alts_tsi_handshaker.cc:257
grpc_gcp_AltsContext_set_application_protocol
UPB_INLINE void grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext *msg, upb_StringView value)
Definition: altscontext.upb.h:120
grpc_gcp_AltsContext_set_record_protocol
UPB_INLINE void grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext *msg, upb_StringView value)
Definition: altscontext.upb.h:123
sync.h
grpc_closure
Definition: closure.h:56
alts_tsi_handshaker
struct alts_tsi_handshaker alts_tsi_handshaker
Definition: alts_handshaker_client.h:40
tsi_peer_destruct
void tsi_peer_destruct(tsi_peer *self)
Definition: transport_security.cc:320
grpc_channel_credentials
Definition: src/core/lib/security/credentials/credentials.h:96
cq
static grpc_completion_queue * cq
Definition: test/core/fling/client.cc:37
tsi_construct_string_peer_property
tsi_result tsi_construct_string_peer_property(const char *name, const char *value, size_t value_length, tsi_peer_property *property)
Definition: transport_security.cc:346
sync.h
cb
OPENSSL_EXPORT pem_password_cb * cb
Definition: pem.h:351
tsi_construct_string_peer_property_from_cstring
tsi_result tsi_construct_string_peer_property_from_cstring(const char *name, const char *value, tsi_peer_property *property)
Definition: transport_security.cc:340
grpc_slice_unref_internal
void grpc_slice_unref_internal(const grpc_slice &slice)
Definition: slice_refcount.h:39
tsi_construct_peer
tsi_result tsi_construct_peer(size_t property_count, tsi_peer *peer)
Definition: transport_security.cc:359
alts_tsi_handshaker_result
Definition: alts_tsi_handshaker.cc:75
GRPC_ERROR_IS_NONE
#define GRPC_ERROR_IS_NONE(err)
Definition: error.h:241
channel.h
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:41