diff options
author | Ping Yu <ping.yu@intel.com> | 2018-08-13 06:20:00 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-08-17 14:48:10 +0000 |
commit | decda5b466843b3164ba13f248f9e0bb93111782 (patch) | |
tree | 3a33e53c4e42e36e2d37209ab954cddad900bc2c /src/plugins/tlsmbedtls | |
parent | 38b99d06ad00d09f406998e23c1d6cf44e11b86e (diff) |
optimize init_server to reduce session overhead
move un-necessary session based operation to listener
split orignal openssl ctx to be session based ctx and listen ctx
Change-Id: Id6c54f47b0e2171fd8924a45efcd5266ce5402d5
Signed-off-by: Ping Yu <ping.yu@intel.com>
Diffstat (limited to 'src/plugins/tlsmbedtls')
-rw-r--r-- | src/plugins/tlsmbedtls/tls_mbedtls.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/tlsmbedtls/tls_mbedtls.c b/src/plugins/tlsmbedtls/tls_mbedtls.c index aaad99f0fdb..57a6e486c3f 100644 --- a/src/plugins/tlsmbedtls/tls_mbedtls.c +++ b/src/plugins/tlsmbedtls/tls_mbedtls.c @@ -259,6 +259,18 @@ mbedtls_ctx_init_client (tls_ctx_t * ctx) } static int +mbedtls_start_listen (tls_ctx_t * lctx) +{ + return 0; +} + +static int +mbedtls_stop_listen (tls_ctx_t * lctx) +{ + return 0; +} + +static int mbedtls_ctx_init_server (tls_ctx_t * ctx) { mbedtls_ctx_t *mc = (mbedtls_ctx_t *) ctx; @@ -530,6 +542,8 @@ const static tls_engine_vft_t mbedtls_engine = { .ctx_write = mbedtls_ctx_write, .ctx_read = mbedtls_ctx_read, .ctx_handshake_is_over = mbedtls_handshake_is_over, + .ctx_start_listen = mbedtls_start_listen, + .ctx_stop_listen = mbedtls_stop_listen, }; int |