summaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsopenssl/tls_openssl.h
diff options
context:
space:
mode:
authorYu Ping <ping.yu@intel.com>2020-01-21 05:07:30 +0800
committerFlorin Coras <florin.coras@gmail.com>2020-02-03 16:34:01 +0000
commitf4a92f6a1cf6b27318b6819ad3145b4020a27779 (patch)
tree31424b9e947f0582731921929b1a03676b3db972 /src/plugins/tlsopenssl/tls_openssl.h
parent564e1672917e205d7ae79525bb937df18f8d764b (diff)
tls: refactor for tls async event handling
Type: refactor Make sure one tls ctx has one event availble Thus ctx has the same life time with event, which can simplify the management. Change-Id: I1f4240e7316025d81bb97644946ffa399c00cd76 Signed-off-by: Yu Ping <ping.yu@intel.com>
Diffstat (limited to 'src/plugins/tlsopenssl/tls_openssl.h')
-rw-r--r--src/plugins/tlsopenssl/tls_openssl.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl.h b/src/plugins/tlsopenssl/tls_openssl.h
index e392b9ae4f2..f61d986c3b0 100644
--- a/src/plugins/tlsopenssl/tls_openssl.h
+++ b/src/plugins/tlsopenssl/tls_openssl.h
@@ -54,23 +54,17 @@ typedef struct openssl_main_
int async;
} openssl_main_t;
-typedef struct openssl_tls_callback_
-{
- int (*callback) (SSL * ssl, void *arg);
- void *arg;
-} openssl_tls_callback_t;
-
typedef int openssl_resume_handler (tls_ctx_t * ctx, session_t * tls_session);
tls_ctx_t *openssl_ctx_get_w_thread (u32 ctx_index, u8 thread_index);
-openssl_tls_callback_t *vpp_add_async_pending_event (tls_ctx_t * ctx,
- openssl_resume_handler *
- handler);
-int vpp_add_async_run_event (tls_ctx_t * ctx, openssl_resume_handler *
- handler);
+int vpp_tls_async_init_event (tls_ctx_t * ctx,
+ openssl_resume_handler * handler,
+ session_t * session);
+int vpp_tls_async_update_event (tls_ctx_t * ctx, int eagain);
int tls_async_openssl_callback (SSL * s, void *evt);
+int openssl_evt_free (int event_idx, u8 thread_index);
void openssl_polling_start (ENGINE * engine);
-int openssl_engine_register (char *engine, char *alg);
+int openssl_engine_register (char *engine, char *alg, int async);
void openssl_async_node_enable_disable (u8 is_en);
clib_error_t *tls_openssl_api_init (vlib_main_t * vm);
int tls_openssl_set_ciphers (char *ciphers);