Go to the documentation of this file.
34 #define ALTS_HANDSHAKER_CLIENT_TEST_OUT_FRAME "Hello Google"
35 #define ALTS_HANDSHAKER_CLIENT_TEST_TARGET_NAME "bigtable.google.api.com"
36 #define ALTS_HANDSHAKER_CLIENT_TEST_TARGET_SERVICE_ACCOUNT1 "A@google.com"
37 #define ALTS_HANDSHAKER_CLIENT_TEST_TARGET_SERVICE_ACCOUNT2 "B@google.com"
38 #define ALTS_HANDSHAKER_CLIENT_TEST_MAX_FRAME_SIZE (64 * 1024)
84 size_t target_identities_count) {
103 size_t nops,
bool is_start) {
187 application_protocols[0],
196 size_t target_identities_count;
199 client_start, &target_identities_count);
236 application_protocols[0],
329 nullptr,
nullptr,
nullptr,
nullptr,
false,
333 nullptr, client_options,
335 nullptr,
nullptr,
nullptr,
nullptr,
true,
450 const unsigned char* ,
size_t ,
505 int main(
int argc,
char** argv) {
tsi_result alts_handshaker_client_start_server(alts_handshaker_client *client, grpc_slice *bytes_received)
struct grpc_gcp_NextHandshakeMessageReq grpc_gcp_NextHandshakeMessageReq
GPRAPI void grpc_slice_unref(grpc_slice s)
GRPCAPI void grpc_alts_credentials_options_destroy(grpc_alts_credentials_options *options)
void alts_handshaker_client_set_cb_for_testing(alts_handshaker_client *c, tsi_handshaker_on_next_done_cb cb)
struct grpc_byte_buffer * send_message
UPB_INLINE upb_StringView grpc_gcp_Identity_service_account(const grpc_gcp_Identity *msg)
struct grpc_gcp_RpcProtocolVersions_Version grpc_gcp_RpcProtocolVersions_Version
static grpc_gcp_HandshakerReq * deserialize_handshaker_req(grpc_byte_buffer *buffer, upb_Arena *arena)
UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_get(const grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters **val)
struct alts_handshaker_client_test_config alts_handshaker_client_test_config
const UPB_INLINE grpc_gcp_Identity *const * grpc_gcp_StartClientHandshakeReq_target_identities(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len)
struct grpc_op::grpc_op_data::grpc_op_send_initial_metadata send_initial_metadata
const UPB_INLINE grpc_gcp_StartServerHandshakeReq * grpc_gcp_HandshakerReq_server_start(const grpc_gcp_HandshakerReq *msg)
static grpc_call_error check_must_not_be_called(grpc_call *, const grpc_op *, size_t, grpc_closure *)
grpc_byte_buffer ** alts_handshaker_client_get_recv_buffer_addr_for_testing(alts_handshaker_client *c)
UPB_INLINE int32_t grpc_gcp_StartClientHandshakeReq_handshake_security_protocol(const grpc_gcp_StartClientHandshakeReq *msg)
UPB_INLINE size_t grpc_gcp_StartServerHandshakeReq_handshake_parameters_size(const grpc_gcp_StartServerHandshakeReq *msg)
GRPCAPI grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader)
void grpc_alts_shared_resource_dedicated_init()
GPRAPI void gpr_free(void *ptr)
grpc_gcp_HandshakerReq * grpc_gcp_handshaker_req_decode(grpc_slice slice, upb_Arena *arena)
static grpc_call_error check_next_success(grpc_call *, const grpc_op *op, size_t nops, grpc_closure *closure)
alts_handshaker_client * server
#define ALTS_HANDSHAKER_CLIENT_TEST_MAX_FRAME_SIZE
void grpc_alts_shared_resource_dedicated_shutdown()
const size_t kMinRpcVersionMinor
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)
struct grpc_op::grpc_op_data::grpc_op_recv_message recv_message
grpc_core::ScopedArenaPtr arena
union grpc_op::grpc_op_data data
static void destroy_config(alts_handshaker_client_test_config *config)
const size_t kHandshakerClientOpNum
struct grpc_gcp_HandshakerReq grpc_gcp_HandshakerReq
GPRAPI void * gpr_zalloc(size_t size)
UPB_INLINE upb_StringView const * grpc_gcp_StartServerHandshakeReq_application_protocols(const grpc_gcp_StartServerHandshakeReq *msg, size_t *len)
struct grpc_gcp_ServerHandshakeParameters grpc_gcp_ServerHandshakeParameters
void alts_handshaker_client_shutdown(alts_handshaker_client *client)
#define ALTS_HANDSHAKER_SERVICE_URL_FOR_TESTING
struct grpc_byte_buffer ** recv_message
UPB_INLINE upb_StringView grpc_gcp_StartClientHandshakeReq_target_name(const grpc_gcp_StartClientHandshakeReq *msg)
const UPB_INLINE grpc_gcp_RpcProtocolVersions_Version * grpc_gcp_RpcProtocolVersions_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg)
GRPCAPI grpc_alts_credentials_options * grpc_alts_credentials_client_options_create(void)
@ GRPC_OP_RECV_INITIAL_METADATA
UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_major(const grpc_gcp_RpcProtocolVersions_Version *msg)
tsi_result alts_handshaker_client_start_client(alts_handshaker_client *client)
UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_minor(const grpc_gcp_RpcProtocolVersions_Version *msg)
GRPCAPI void grpc_alts_credentials_client_options_add_target_service_account(grpc_alts_credentials_options *options, const char *service_account)
GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer)
static void schedule_request_invalid_arg_test()
struct grpc_call grpc_call
grpc_byte_buffer * alts_handshaker_client_get_send_buffer_for_testing(alts_handshaker_client *c)
struct grpc_gcp_StartServerHandshakeReq grpc_gcp_StartServerHandshakeReq
GRPCAPI grpc_channel_credentials * grpc_insecure_credentials_create()
#define ALTS_HANDSHAKER_CLIENT_TEST_OUT_FRAME
alts_handshaker_client * client
grpc_closure * alts_handshaker_client_get_closure_for_testing(alts_handshaker_client *c)
GPRAPI grpc_slice grpc_slice_from_static_string(const char *source)
#define ALTS_HANDSHAKER_CLIENT_TEST_TARGET_NAME
UPB_INLINE uint32_t grpc_gcp_StartServerHandshakeReq_max_frame_size(const grpc_gcp_StartServerHandshakeReq *msg)
tsi_result alts_handshaker_client_next(alts_handshaker_client *client, grpc_slice *bytes_received)
static void validate_rpc_protocol_versions(const grpc_gcp_RpcProtocolVersions *versions)
UPB_INLINE const struct grpc_gcp_RpcProtocolVersions * grpc_gcp_StartServerHandshakeReq_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg)
UPB_INLINE bool upb_StringView_IsEqual(upb_StringView a, upb_StringView b)
struct grpc_gcp_RpcProtocolVersions grpc_gcp_RpcProtocolVersions
bool grpc_gcp_rpc_protocol_versions_set_min(grpc_gcp_rpc_protocol_versions *versions, uint32_t min_major, uint32_t min_minor)
int main(int argc, char **argv)
UPB_INLINE upb_StringView const * grpc_gcp_StartClientHandshakeReq_application_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len)
static grpc_call_error check_server_start_success(grpc_call *, const grpc_op *op, size_t nops, grpc_closure *closure)
const size_t kMaxRpcVersionMinor
GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials *creds)
def server_options(multi_method_implementation=None, request_deserializers=None, response_serializers=None, thread_pool=None, thread_pool_size=None, default_timeout=None, maximum_timeout=None)
const UPB_INLINE grpc_gcp_StartClientHandshakeReq * grpc_gcp_HandshakerReq_client_start(const grpc_gcp_HandshakerReq *msg)
static void validate_target_identities(const grpc_gcp_Identity *const *target_identities, size_t target_identities_count)
GRPCAPI grpc_channel * grpc_channel_create(const char *target, grpc_channel_credentials *creds, const grpc_channel_args *args)
struct grpc_gcp_Identity grpc_gcp_Identity
GRPCAPI grpc_alts_credentials_options * grpc_alts_credentials_server_options_create(void)
#define ALTS_APPLICATION_PROTOCOL
UPB_INLINE upb_StringView const * grpc_gcp_StartClientHandshakeReq_record_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len)
UPB_INLINE const struct grpc_gcp_RpcProtocolVersions * grpc_gcp_StartClientHandshakeReq_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg)
static alts_handshaker_client_test_config * create_config()
GRPCAPI void grpc_completion_queue_destroy(grpc_completion_queue *cq)
void alts_handshaker_client_destroy(alts_handshaker_client *c)
@ GRPC_OP_SEND_INITIAL_METADATA
grpc_core::ExecCtx exec_ctx
struct grpc_op::grpc_op_data::grpc_op_send_message send_message
void alts_handshaker_client_set_grpc_caller_for_testing(alts_handshaker_client *c, alts_grpc_caller caller)
UPB_INLINE uint32_t grpc_gcp_StartClientHandshakeReq_max_frame_size(const grpc_gcp_StartClientHandshakeReq *msg)
UPB_INLINE upb_StringView grpc_gcp_NextHandshakeMessageReq_in_bytes(const grpc_gcp_NextHandshakeMessageReq *msg)
AllocList * next[kMaxLevel]
#define ALTS_RECORD_PROTOCOL
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
static void schedule_request_success_test()
grpc_metadata_array * alts_handshaker_client_get_initial_metadata_for_testing(alts_handshaker_client *c)
struct grpc_channel grpc_channel
const size_t kMaxRpcVersionMajor
UPB_INLINE upb_StringView upb_StringView_FromString(const char *data)
static void tsi_cb_assert_tsi_internal_error(tsi_result status, void *, const unsigned char *, size_t, tsi_handshaker_result *)
static grpc_call_error check_grpc_call_failure(grpc_call *, const grpc_op *op, size_t nops, grpc_closure *)
static bool is_recv_status_op(const grpc_op *op, size_t nops)
bool grpc_gcp_rpc_protocol_versions_set_max(grpc_gcp_rpc_protocol_versions *versions, uint32_t max_major, uint32_t max_minor)
#define ALTS_HANDSHAKER_CLIENT_TEST_TARGET_SERVICE_ACCOUNT2
const UPB_INLINE grpc_gcp_NextHandshakeMessageReq * grpc_gcp_HandshakerReq_next(const grpc_gcp_HandshakerReq *msg)
void alts_handshaker_client_on_status_received_for_testing(alts_handshaker_client *c, grpc_status_code status, grpc_error_handle error)
static void schedule_request_grpc_call_failure_test()
static bool validate_op(alts_handshaker_client *c, const grpc_op *op, size_t nops, bool is_start)
#define ALTS_HANDSHAKER_CLIENT_TEST_TARGET_SERVICE_ACCOUNT1
GRPCAPI grpc_completion_queue * grpc_completion_queue_create_for_next(void *reserved)
struct grpc_op::grpc_op_data::grpc_op_recv_initial_metadata recv_initial_metadata
UPB_INLINE upb_StringView const * grpc_gcp_ServerHandshakeParameters_record_protocols(const grpc_gcp_ServerHandshakeParameters *msg, size_t *len)
static grpc_call_error check_client_start_success(grpc_call *, const grpc_op *op, size_t nops, grpc_closure *closure)
GRPCAPI void grpc_init(void)
struct grpc_gcp_StartClientHandshakeReq grpc_gcp_StartClientHandshakeReq
@ GRPC_OP_RECV_STATUS_ON_CLIENT
grpc_completion_queue * cq
GRPCAPI void grpc_shutdown(void)
const size_t kMinRpcVersionMajor
const UPB_INLINE grpc_gcp_RpcProtocolVersions_Version * grpc_gcp_RpcProtocolVersions_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg)
GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader)
static grpc_alts_credentials_options * create_credentials_options(bool is_client)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:41