fake_transport_security.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 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_FAKE_TRANSPORT_SECURITY_H
20 #define GRPC_CORE_TSI_FAKE_TRANSPORT_SECURITY_H
21 
23 
26 
27 /* Value for the TSI_CERTIFICATE_TYPE_PEER_PROPERTY property for FAKE certs. */
28 #define TSI_FAKE_CERTIFICATE_TYPE "FAKE"
29 /* Value of the TSI_SECURITY_LEVEL_PEER_PROPERTY property for FAKE certs. */
30 #define TSI_FAKE_SECURITY_LEVEL "TSI_SECURITY_NONE"
31 
32 /* Creates a fake handshaker that will create a fake frame protector.
33 
34  No cryptography is performed in these objects. They just simulate handshake
35  messages going back and forth for the handshaker and do some framing on
36  cleartext data for the protector. */
38 
39 /* Creates a protector directly without going through the handshake phase. */
41  size_t* max_protected_frame_size);
42 
43 /* Creates a zero-copy protector directly without going through the handshake
44  * phase. */
46  size_t* max_protected_frame_size);
47 
48 /* Given a buffer containing slices encrypted by a fake_zero_copy_protector
49  * it parses these protected slices to return the total frame size of the first
50  * contained frame */
52  const grpc_slice_buffer* protected_slices);
53 #endif /* GRPC_CORE_TSI_FAKE_TRANSPORT_SECURITY_H */
tsi_handshaker
Definition: transport_security.h:84
tsi_create_fake_frame_protector
tsi_frame_protector * tsi_create_fake_frame_protector(size_t *max_protected_frame_size)
Definition: fake_transport_security.cc:797
tsi_create_fake_zero_copy_grpc_protector
tsi_zero_copy_grpc_protector * tsi_create_fake_zero_copy_grpc_protector(size_t *max_protected_frame_size)
Definition: fake_transport_security.cc:808
tsi_fake_zero_copy_grpc_protector_next_frame_size
uint32_t tsi_fake_zero_copy_grpc_protector_next_frame_size(const grpc_slice_buffer *protected_slices)
Definition: fake_transport_security.cc:146
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
slice_internal.h
transport_security_interface.h
grpc_slice_buffer
Definition: include/grpc/impl/codegen/slice.h:83
tsi_frame_protector
Definition: transport_security.h:51
tsi_zero_copy_grpc_protector
Definition: transport_security_grpc.h:79
tsi_create_fake_handshaker
tsi_handshaker * tsi_create_fake_handshaker(int is_client)
Definition: fake_transport_security.cc:778
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:22