| 1 |
#ifndef AWS_IO_TLS_CHANNEL_HANDLER_SHARED_H |
| 2 |
#define AWS_IO_TLS_CHANNEL_HANDLER_SHARED_H |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
#include <aws/io/io.h> |
| 9 |
|
| 10 |
#include <aws/io/channel.h> |
| 11 |
#include <aws/io/statistics.h> |
| 12 |
|
| 13 |
struct aws_tls_connection_options; |
| 14 |
|
| 15 |
struct aws_tls_channel_handler_shared { |
| 16 |
uint32_t tls_timeout_ms; |
| 17 |
struct aws_channel_handler *handler; |
| 18 |
struct aws_channel_task timeout_task; |
| 19 |
struct aws_crt_statistics_tls stats; |
| 20 |
}; |
| 21 |
|
| 22 |
enum aws_tls_handler_read_state { |
| 23 |
AWS_TLS_HANDLER_OPEN, |
| 24 |
AWS_TLS_HANDLER_READ_SHUTTING_DOWN, |
| 25 |
AWS_TLS_HANDLER_READ_SHUT_DOWN_COMPLETE, |
| 26 |
}; |
| 27 |
|
| 28 |
AWS_EXTERN_C_BEGIN |
| 29 |
|
| 30 |
AWS_IO_API bool aws_is_using_secitem(void); |
| 31 |
|
| 32 |
AWS_IO_API void aws_tls_channel_handler_shared_init( |
| 33 |
struct aws_tls_channel_handler_shared *tls_handler_shared, |
| 34 |
struct aws_channel_handler *handler, |
| 35 |
struct aws_tls_connection_options *options); |
| 36 |
|
| 37 |
AWS_IO_API void aws_tls_channel_handler_shared_clean_up(struct aws_tls_channel_handler_shared *tls_handler_shared); |
| 38 |
|
| 39 |
AWS_IO_API void aws_on_drive_tls_negotiation(struct aws_tls_channel_handler_shared *tls_handler_shared); |
| 40 |
|
| 41 |
AWS_IO_API void aws_on_tls_negotiation_completed( |
| 42 |
struct aws_tls_channel_handler_shared *tls_handler_shared, |
| 43 |
int error_code); |
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
AWS_IO_API bool aws_tls_options_buf_is_set(const struct aws_byte_buf *buf); |
| 55 |
|
| 56 |
AWS_EXTERN_C_END |
| 57 |
|
| 58 |
#endif |