Macros | Typedefs | Functions | Variables
alts_tsi_handshaker.h File Reference
#include <grpc/support/port_platform.h>
#include <grpc/grpc.h>
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/security/credentials/alts/grpc_alts_credentials_options.h"
#include "src/core/tsi/alts/handshaker/alts_handshaker_client.h"
#include "src/core/tsi/transport_security.h"
#include "src/core/tsi/transport_security_interface.h"
#include "src/proto/grpc/gcp/altscontext.upb.h"
#include "src/proto/grpc/gcp/handshaker.upb.h"
Include dependency graph for alts_tsi_handshaker.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define TSI_ALTS_CERTIFICATE_TYPE   "ALTS"
 
#define TSI_ALTS_CONTEXT   "alts_context"
 
#define TSI_ALTS_RPC_VERSIONS   "rpc_versions"
 
#define TSI_ALTS_SERVICE_ACCOUNT_PEER_PROPERTY   "service_account"
 

Typedefs

typedef struct alts_tsi_handshaker alts_tsi_handshaker
 

Functions

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)
 
bool alts_tsi_handshaker_has_shutdown (alts_tsi_handshaker *handshaker)
 
tsi_result alts_tsi_handshaker_result_create (grpc_gcp_HandshakerResp *resp, bool is_client, tsi_handshaker_result **result)
 
void alts_tsi_handshaker_result_set_unused_bytes (tsi_handshaker_result *result, grpc_slice *recv_bytes, size_t bytes_consumed)
 

Variables

const size_t kTsiAltsMaxFrameSize = 1024 * 1024
 
const size_t kTsiAltsMinFrameSize = 16 * 1024
 
const size_t kTsiAltsNumOfPeerProperties = 5
 

Macro Definition Documentation

◆ TSI_ALTS_CERTIFICATE_TYPE

#define TSI_ALTS_CERTIFICATE_TYPE   "ALTS"

Definition at line 35 of file alts_tsi_handshaker.h.

◆ TSI_ALTS_CONTEXT

#define TSI_ALTS_CONTEXT   "alts_context"

Definition at line 37 of file alts_tsi_handshaker.h.

◆ TSI_ALTS_RPC_VERSIONS

#define TSI_ALTS_RPC_VERSIONS   "rpc_versions"

Definition at line 36 of file alts_tsi_handshaker.h.

◆ TSI_ALTS_SERVICE_ACCOUNT_PEER_PROPERTY

#define TSI_ALTS_SERVICE_ACCOUNT_PEER_PROPERTY   "service_account"

Definition at line 34 of file alts_tsi_handshaker.h.

Typedef Documentation

◆ alts_tsi_handshaker

Definition at line 46 of file alts_tsi_handshaker.h.

Function Documentation

◆ 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 
)

This method creates a ALTS TSI handshaker instance.

  • options: ALTS credentials options containing information passed from TSI caller (e.g., rpc protocol versions).
  • target_name: the name of the endpoint that the channel is connecting to, and will be used for secure naming check.
  • handshaker_service_url: address of ALTS handshaker service in the format of "host:port".
  • is_client: boolean value indicating if the handshaker is used at the client (is_client = true) or server (is_client = false) side.
  • interested_parties: set of pollsets interested in this connection.
  • self: address of ALTS TSI handshaker instance to be returned from the method.
  • user_specified_max_frame_size: Determines the maximum frame size used by frame protector that is specified via user. If unspecified, the value is 0.

It returns TSI_OK on success and an error status code on failure. Note that if interested_parties is nullptr, a dedicated TSI thread will be created and used.

Definition at line 639 of file alts_tsi_handshaker.cc.

◆ alts_tsi_handshaker_has_shutdown()

bool alts_tsi_handshaker_has_shutdown ( alts_tsi_handshaker handshaker)

This method returns a boolean value indicating if an ALTS TSI handshaker has been shutdown or not.

Definition at line 633 of file alts_tsi_handshaker.cc.

◆ alts_tsi_handshaker_result_create()

tsi_result alts_tsi_handshaker_result_create ( grpc_gcp_HandshakerResp resp,
bool  is_client,
tsi_handshaker_result **  result 
)

This method creates an ALTS TSI handshaker result instance.

  • resp: data received from the handshaker service.
  • is_client: a boolean value indicating if the result belongs to a client or not.
  • result: address of ALTS TSI handshaker result instance.

Definition at line 265 of file alts_tsi_handshaker.cc.

◆ 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 
)

This method sets unused bytes of ALTS TSI handshaker result instance.

  • result: an ALTS TSI handshaker result instance.
  • recv_bytes: data received from the handshaker service.
  • bytes_consumed: size of data consumed by the handshaker service.

Definition at line 669 of file alts_tsi_handshaker.cc.

Variable Documentation

◆ kTsiAltsMaxFrameSize

const size_t kTsiAltsMaxFrameSize = 1024 * 1024

Definition at line 44 of file alts_tsi_handshaker.h.

◆ kTsiAltsMinFrameSize

const size_t kTsiAltsMinFrameSize = 16 * 1024

Definition at line 43 of file alts_tsi_handshaker.h.

◆ kTsiAltsNumOfPeerProperties

const size_t kTsiAltsNumOfPeerProperties = 5

Definition at line 39 of file alts_tsi_handshaker.h.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:02