3 * Copyright 2018 gRPC authors.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_PRIVATE_H
20 #define GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_PRIVATE_H
22 #include <grpc/support/port_platform.h>
24 #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h"
30 * Unsafe, use for testing only. */
32 alts_handshaker_client* alts_tsi_handshaker_get_client_for_testing(
33 alts_tsi_handshaker* handshaker);
35 bool alts_tsi_handshaker_get_has_sent_start_message_for_testing(
36 alts_tsi_handshaker* handshaker);
38 void alts_tsi_handshaker_set_client_vtable_for_testing(
39 alts_tsi_handshaker* handshaker, alts_handshaker_client_vtable* vtable);
41 bool alts_tsi_handshaker_get_is_client_for_testing(
42 alts_tsi_handshaker* handshaker);
44 void alts_handshaker_client_set_grpc_caller_for_testing(
45 alts_handshaker_client* client, alts_grpc_caller caller);
47 grpc_byte_buffer* alts_handshaker_client_get_send_buffer_for_testing(
48 alts_handshaker_client* client);
50 grpc_byte_buffer** alts_handshaker_client_get_recv_buffer_addr_for_testing(
51 alts_handshaker_client* client);
53 grpc_metadata_array* alts_handshaker_client_get_initial_metadata_for_testing(
54 alts_handshaker_client* client);
56 void alts_handshaker_client_set_recv_bytes_for_testing(
57 alts_handshaker_client* client, grpc_slice* recv_bytes);
59 void alts_handshaker_client_check_fields_for_testing(
60 alts_handshaker_client* client, tsi_handshaker_on_next_done_cb cb,
61 void* user_data, bool has_sent_start_message, grpc_slice* recv_bytes);
63 void alts_handshaker_client_set_fields_for_testing(
64 alts_handshaker_client* client, alts_tsi_handshaker* handshaker,
65 tsi_handshaker_on_next_done_cb cb, void* user_data,
66 grpc_byte_buffer* recv_buffer, grpc_status_code status);
68 void alts_handshaker_client_set_vtable_for_testing(
69 alts_handshaker_client* client, alts_handshaker_client_vtable* vtable);
71 alts_tsi_handshaker* alts_handshaker_client_get_handshaker_for_testing(
72 alts_handshaker_client* client);
74 void alts_handshaker_client_set_cb_for_testing(
75 alts_handshaker_client* client, tsi_handshaker_on_next_done_cb cb);
77 grpc_closure* alts_handshaker_client_get_closure_for_testing(
78 alts_handshaker_client* client);
80 } // namespace internal
81 } // namespace grpc_core
83 #endif /* GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_TSI_HANDSHAKER_PRIVATE_H */