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_PRIVATE_H
20 #define GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_PRIVATE_H
21 
22 #include <grpc/support/port_platform.h>
23 
24 #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h"
25 
26 namespace grpc_core {
27 namespace internal {
28 
29 /**
30  * Unsafe, use for testing only. It allows the caller to change the way the
31  * ALTS TSI handshaker schedules handshaker requests.
32  */
33 void alts_tsi_handshaker_set_client_for_testing(alts_tsi_handshaker* handshaker,
34                                                 alts_handshaker_client* client);
35 
36 alts_handshaker_client* alts_tsi_handshaker_get_client_for_testing(
37     alts_tsi_handshaker* handshaker);
38 
39 /* For testing only. */
40 bool alts_tsi_handshaker_get_has_sent_start_message_for_testing(
41     alts_tsi_handshaker* handshaker);
42 
43 bool alts_tsi_handshaker_get_is_client_for_testing(
44     alts_tsi_handshaker* handshaker);
45 
46 void alts_tsi_handshaker_set_recv_bytes_for_testing(
47     alts_tsi_handshaker* handshaker, grpc_slice* slice);
48 
49 grpc_slice alts_tsi_handshaker_get_recv_bytes_for_testing(
50     alts_tsi_handshaker* handshaker);
51 
52 }  // namespace internal
53 }  // namespace grpc_core
54 
55 #endif /* GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_PRIVATE_H */
56