session: cleanup part 1
[vpp.git] / src / plugins / tlsopenssl / tls_openssl.h
index c1a21e5..66e0b36 100644 (file)
@@ -29,27 +29,35 @@ typedef struct tls_ctx_openssl_
   SSL *ssl;
   BIO *rbio;
   BIO *wbio;
+} openssl_ctx_t;
+
+typedef struct tls_listen_ctx_opensl_
+{
+  u32 openssl_lctx_index;
+  SSL_CTX *ssl_ctx;
+  SSL *ssl;
   X509 *srvcert;
   EVP_PKEY *pkey;
-} openssl_ctx_t;
+} openssl_listen_ctx_t;
 
 typedef struct openssl_main_
 {
   openssl_ctx_t ***ctx_pool;
+  openssl_listen_ctx_t *lctx_pool;
 
   X509_STORE *cert_store;
+  u8 *ciphers;
   int engine_init;
   int async;
 } openssl_main_t;
 
 typedef struct openssl_tls_callback_
 {
-  int (*callback) (void *arg);
+  int (*callback) (SSL * ssl, void *arg);
   void *arg;
 } openssl_tls_callback_t;
 
-typedef int openssl_resume_handler (tls_ctx_t * ctx,
-                                   stream_session_t * tls_session);
+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,
@@ -57,6 +65,7 @@ openssl_tls_callback_t *vpp_add_async_pending_event (tls_ctx_t * ctx,
                                                     handler);
 int vpp_add_async_run_event (tls_ctx_t * ctx, openssl_resume_handler *
                             handler);
+int tls_async_openssl_callback (SSL * s, void *evt);
 void openssl_polling_start (ENGINE * engine);
 int openssl_engine_register (char *engine, char *alg);
 void openssl_async_node_enable_disable (u8 is_en);