aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/tlsopenssl/tls_openssl_api.c
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_api.c
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_api.c')
-rw-r--r--src/plugins/tlsopenssl/tls_openssl_api.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl_api.c b/src/plugins/tlsopenssl/tls_openssl_api.c
index b305bf2677f..c34829f0b29 100644
--- a/src/plugins/tlsopenssl/tls_openssl_api.c
+++ b/src/plugins/tlsopenssl/tls_openssl_api.c
@@ -40,12 +40,6 @@ vl_api_tls_openssl_set_engine_t_handler (vl_api_tls_openssl_set_engine_t * mp)
char *ciphers;
int rv;
- if (mp->async_enable)
- {
- om->async = 1;
- openssl_async_node_enable_disable (1);
- }
-
ciphers = (char *) &mp->ciphers;
ciphers[63] = '\0';
if (ciphers[0])
@@ -55,7 +49,8 @@ vl_api_tls_openssl_set_engine_t_handler (vl_api_tls_openssl_set_engine_t * mp)
engine[63] = '\0';
alg = (char *) mp->algorithm;
alg[63] = '\0';
- rv = openssl_engine_register (engine, alg);
+ rv = openssl_engine_register (engine, alg, mp->async_enable);
+ om->async = mp->async_enable;
REPLY_MACRO (VL_API_TLS_OPENSSL_SET_ENGINE_REPLY);
}