Pull out common SSL interface

Currently only OpenSSL API impl, but the plan is to add more.

PUBLISHED_FROM=c85b26fa2312047768bdcf3eca583e60862aba90
This commit is contained in:
Deomid Ryabkov
2016-11-11 20:51:01 +00:00
committed by Cesanta Bot
parent 4805797752
commit f67fe352cf
3 changed files with 557 additions and 431 deletions
+3 -11
View File
@@ -14,19 +14,11 @@ signature: |
size_t recv_mbuf_limit; /* Max size of recv buffer */
struct mbuf recv_mbuf; /* Received data */
struct mbuf send_mbuf; /* Data scheduled for sending */
#if MG_ENABLE_SSL
#if MG_NET_IF != MG_NET_IF_SIMPLELINK
SSL *ssl;
SSL_CTX *ssl_ctx;
#else
char *ssl_cert;
char *ssl_key;
char *ssl_ca_cert;
char *ssl_server_name;
#endif
#endif
time_t last_io_time; /* Timestamp of the last socket IO */
double ev_timer_time; /* Timestamp of the future MG_EV_TIMER */
#if MG_ENABLE_SSL
void *ssl_if_data; /* SSL library data. */
#endif
mg_event_handler_t proto_handler; /* Protocol-specific event handler */
void *proto_data; /* Protocol-specific data */
void (*proto_data_destructor)(void *proto_data);