session: first approximation implementation of tls
It consists of two main parts. First, add an application transport type
whereby applications can offer transport to other applications. For
instance, a tls app can offer transport services to other applications.
And second, a tls transport app that leverages the mbedtls library for
tls protocol implementation.
Change-Id: I616996c6e6539a9e2368fab8a1ac874d7c5d9838
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session_test.c b/src/vnet/session/session_test.c
index 85e8732..91ac351 100644
--- a/src/vnet/session/session_test.c
+++ b/src/vnet/session/session_test.c
@@ -69,12 +69,6 @@
return 0;
}
-int
-dummy_redirect_connect_callback (u32 client_index, void *mp)
-{
- return VNET_API_ERROR_SESSION_REDIRECT;
-}
-
void
dummy_session_disconnect_callback (stream_session_t * s)
{
@@ -104,7 +98,7 @@
.session_connected_callback = dummy_session_connected_callback,
.session_accept_callback = dummy_session_accept_callback,
.session_disconnect_callback = dummy_session_disconnect_callback,
- .builtin_server_rx_callback = dummy_server_rx_callback,
+ .builtin_app_rx_callback = dummy_server_rx_callback,
.add_segment_callback = dummy_add_segment_callback,
.del_segment_callback = dummy_del_segment_callback,
};
@@ -1316,8 +1310,10 @@
SESSION_TEST ((handle == SESSION_DROP_HANDLE), "lookup for 1.2.3.4/32 1234 "
"5.6.7.8/16 432*2* in local table should return deny");
+
connect_args.app_index = server_index;
connect_args.sep = sep;
+
error = vnet_connect (&connect_args);
SESSION_TEST ((error != 0), "connect should fail");
rv = clib_error_get_code (error);