GRPC Core  9.0.0
alts_tsi_handshaker.h
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 
19 #ifndef GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_H
20 #define GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_H
21 
23 
24 #include <grpc/grpc.h>
25 
33 
34 #define TSI_ALTS_SERVICE_ACCOUNT_PEER_PROPERTY "service_account"
35 #define TSI_ALTS_CERTIFICATE_TYPE "ALTS"
36 #define TSI_ALTS_RPC_VERSIONS "rpc_versions"
37 #define TSI_ALTS_CONTEXT "alts_context"
38 
39 const size_t kTsiAltsNumOfPeerProperties = 4;
40 
42 
64  const char* handshaker_service_url, bool is_client,
66 
76  bool is_client,
77  tsi_handshaker_result** result);
78 
87  grpc_slice* recv_bytes,
88  size_t bytes_consumed);
89 
95 
96 #endif /* GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_H */
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.
Definition: alts_tsi_handshaker.cc:590
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)
This method creates a ALTS TSI handshaker instance.
Definition: alts_tsi_handshaker.cc:560
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.
Definition: alts_tsi_handshaker.cc:218
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: alts_tsi_handshaker.cc:554
const size_t kTsiAltsNumOfPeerProperties
Definition: alts_tsi_handshaker.h:39
struct grpc_gcp_HandshakerResp grpc_gcp_HandshakerResp
Definition: handshaker.upb.h:46
struct grpc_pollset_set grpc_pollset_set
Definition: pollset_set.h:31
Definition: alts_tsi_handshaker.cc:45
char * handshaker_service_url
Definition: alts_tsi_handshaker.cc:51
bool is_client
Definition: alts_tsi_handshaker.cc:48
grpc_slice target_name
Definition: alts_tsi_handshaker.cc:47
grpc_alts_credentials_options * options
Definition: alts_tsi_handshaker.cc:53
grpc_pollset_set * interested_parties
Definition: alts_tsi_handshaker.cc:52
Definition: grpc_alts_credentials_options.h:35
A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1].
Definition: slice.h:60
Definition: transport_security.h:109
Definition: transport_security.h:79
tsi_result
Definition: transport_security_interface.h:31