19 #ifndef GRPC_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H
20 #define GRPC_CORE_TSI_TRANSPORT_SECURITY_INTERFACE_H
149 const unsigned char* unprotected_bytes,
150 size_t* unprotected_bytes_size,
151 unsigned char* protected_output_frames,
152 size_t* protected_output_frames_size);
164 size_t* protected_output_frames_size,
size_t* still_pending_size);
190 size_t* protected_frames_bytes_size,
unsigned char* unprotected_bytes,
191 size_t* unprotected_bytes_size);
201 #define TSI_CERTIFICATE_TYPE_PEER_PROPERTY "certificate_type"
204 #define TSI_SECURITY_LEVEL_PEER_PROPERTY "security_level"
368 unsigned char* bytes,
382 const unsigned char* bytes,
395 #define tsi_handshaker_is_in_progress(h) \
396 (tsi_handshaker_get_result((h)) == TSI_HANDSHAKE_IN_PROGRESS)
435 tsi_result status,
void* user_data,
const unsigned char* bytes_to_send,
459 size_t received_bytes_size,
const unsigned char** bytes_to_send,
Definition: transport_security.h:50
Definition: transport_security.h:106
Definition: transport_security.h:77
Definition: transport_security_interface.h:208
struct tsi_peer_property::@40 value
char * name
Definition: transport_security_interface.h:209
size_t length
Definition: transport_security_interface.h:212
char * data
Definition: transport_security_interface.h:211
Definition: transport_security_interface.h:216
tsi_peer_property * properties
Definition: transport_security_interface.h:217
size_t property_count
Definition: transport_security_interface.h:218
Definition: transport_security_grpc.h:75
void tsi_handshaker_result_destroy(tsi_handshaker_result *self)
Definition: transport_security.cc:276
tsi_result tsi_handshaker_result_get_unused_bytes(const tsi_handshaker_result *self, const unsigned char **bytes, size_t *bytes_size)
Definition: transport_security.cc:265
void tsi_handshaker_shutdown(tsi_handshaker *self)
Definition: transport_security.cc:229
const char * tsi_security_level_to_string(tsi_security_level security_level)
Definition: transport_security.cc:70
tsi_result tsi_handshaker_get_bytes_to_send_to_peer(tsi_handshaker *self, unsigned char *bytes, size_t *bytes_size)
Definition: transport_security.cc:144
tsi_security_level
Definition: transport_security_interface.h:50
@ TSI_SECURITY_NONE
Definition: transport_security_interface.h:52
@ TSI_INTEGRITY_ONLY
Definition: transport_security_interface.h:53
@ TSI_SECURITY_MIN
Definition: transport_security_interface.h:51
@ TSI_SECURITY_MAX
Definition: transport_security_interface.h:55
@ TSI_PRIVACY_AND_INTEGRITY
Definition: transport_security_interface.h:54
void tsi_peer_destruct(tsi_peer *self)
Definition: transport_security.cc:308
tsi_result
Definition: transport_security_interface.h:31
@ TSI_HANDSHAKE_SHUTDOWN
Definition: transport_security_interface.h:46
@ TSI_INCOMPLETE_DATA
Definition: transport_security_interface.h:36
@ TSI_UNIMPLEMENTED
Definition: transport_security_interface.h:38
@ TSI_INVALID_ARGUMENT
Definition: transport_security_interface.h:34
@ TSI_UNKNOWN_ERROR
Definition: transport_security_interface.h:33
@ TSI_INTERNAL_ERROR
Definition: transport_security_interface.h:39
@ TSI_OK
Definition: transport_security_interface.h:32
@ TSI_OUT_OF_RESOURCES
Definition: transport_security_interface.h:44
@ TSI_PROTOCOL_FAILURE
Definition: transport_security_interface.h:42
@ TSI_ASYNC
Definition: transport_security_interface.h:45
@ TSI_NOT_FOUND
Definition: transport_security_interface.h:41
@ TSI_CLOSE_NOTIFY
Definition: transport_security_interface.h:47
@ TSI_HANDSHAKE_IN_PROGRESS
Definition: transport_security_interface.h:43
@ TSI_DATA_CORRUPTED
Definition: transport_security_interface.h:40
@ TSI_FAILED_PRECONDITION
Definition: transport_security_interface.h:37
@ TSI_PERMISSION_DENIED
Definition: transport_security_interface.h:35
tsi_result tsi_handshaker_result_create_frame_protector(const tsi_handshaker_result *self, size_t *max_output_protected_frame_size, tsi_frame_protector **protector)
Definition: transport_security.cc:254
tsi_tls_version
Definition: transport_security_interface.h:67
@ TSI_TLS1_2
Definition: transport_security_interface.h:68
@ TSI_TLS1_3
Definition: transport_security_interface.h:69
tsi_result tsi_handshaker_create_frame_protector(tsi_handshaker *self, size_t *max_output_protected_frame_size, tsi_frame_protector **protector)
Definition: transport_security.cc:196
tsi_result tsi_frame_protector_protect(tsi_frame_protector *self, const unsigned char *unprotected_bytes, size_t *unprotected_bytes_size, unsigned char *protected_output_frames, size_t *protected_output_frames_size)
Definition: transport_security.cc:87
tsi_result tsi_frame_protector_protect_flush(tsi_frame_protector *self, unsigned char *protected_output_frames, size_t *protected_output_frames_size, size_t *still_pending_size)
Definition: transport_security.cc:104
struct tsi_peer_property tsi_peer_property
void tsi_handshaker_destroy(tsi_handshaker *self)
Definition: transport_security.cc:237
const char * tsi_result_to_string(tsi_result result)
Definition: transport_security.cc:35
tsi_result tsi_handshaker_get_result(tsi_handshaker *self)
Definition: transport_security.cc:174
tsi_client_certificate_request_type
Definition: transport_security_interface.h:58
@ TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY
Definition: transport_security_interface.h:61
@ TSI_DONT_REQUEST_CLIENT_CERTIFICATE
Definition: transport_security_interface.h:60
@ TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY
Definition: transport_security_interface.h:64
@ TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY
Definition: transport_security_interface.h:63
@ TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY
Definition: transport_security_interface.h:62
tsi_result tsi_handshaker_extract_peer(tsi_handshaker *self, tsi_peer *peer)
Definition: transport_security.cc:182
void(* tsi_handshaker_on_next_done_cb)(tsi_result status, void *user_data, const unsigned char *bytes_to_send, size_t bytes_to_send_size, tsi_handshaker_result *handshaker_result)
Definition: transport_security_interface.h:434
tsi_result tsi_handshaker_process_bytes_from_peer(tsi_handshaker *self, const unsigned char *bytes, size_t *bytes_size)
Definition: transport_security.cc:159
void tsi_frame_protector_destroy(tsi_frame_protector *self)
Definition: transport_security.cc:135
grpc_core::TraceFlag tsi_tracing_enabled
tsi_result tsi_handshaker_next(tsi_handshaker *self, const unsigned char *received_bytes, size_t received_bytes_size, const unsigned char **bytes_to_send, size_t *bytes_to_send_size, tsi_handshaker_result **handshaker_result, tsi_handshaker_on_next_done_cb cb, void *user_data)
Definition: transport_security.cc:215
tsi_result tsi_frame_protector_unprotect(tsi_frame_protector *self, const unsigned char *protected_frames_bytes, size_t *protected_frames_bytes_size, unsigned char *unprotected_bytes, size_t *unprotected_bytes_size)
Definition: transport_security.cc:119
tsi_result tsi_handshaker_result_extract_peer(const tsi_handshaker_result *self, tsi_peer *peer)
Definition: transport_security.cc:244