GRPC Core  18.0.0
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 
25 
26 /* Value for the TSI_CERTIFICATE_TYPE_PEER_PROPERTY property for FAKE certs. */
27 #define TSI_FAKE_CERTIFICATE_TYPE "FAKE"
28 /* Value of the TSI_SECURITY_LEVEL_PEER_PROPERTY property for FAKE certs. */
29 #define TSI_FAKE_SECURITY_LEVEL "TSI_SECURITY_NONE"
30 
31 /* Creates a fake handshaker that will create a fake frame protector.
32 
33  No cryptography is performed in these objects. They just simulate handshake
34  messages going back and forth for the handshaker and do some framing on
35  cleartext data for the protector. */
37 
38 /* Creates a protector directly without going through the handshake phase. */
40  size_t* max_protected_frame_size);
41 
42 /* Creates a zero-copy protector directly without going through the handshake
43  * phase. */
45  size_t* max_protected_frame_size);
46 
47 #endif /* GRPC_CORE_TSI_FAKE_TRANSPORT_SECURITY_H */
tsi_handshaker * tsi_create_fake_handshaker(int is_client)
Definition: fake_transport_security.cc:757
tsi_zero_copy_grpc_protector * tsi_create_fake_zero_copy_grpc_protector(size_t *max_protected_frame_size)
Definition: fake_transport_security.cc:788
tsi_frame_protector * tsi_create_fake_frame_protector(size_t *max_protected_frame_size)
Definition: fake_transport_security.cc:777
Definition: transport_security.h:50
Definition: transport_security.h:77
Definition: transport_security_grpc.h:75