net: tls: Add TLS context allocation/deallocation

Add tls_context structure that stored data required by TLS socket
implementation. This structure is allocated from global pool during
socket creation and freed during socket closure.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
Robert Lubos 2018-07-02 16:14:27 +02:00 committed by Anas Nashif
commit a7c698d936
4 changed files with 191 additions and 2 deletions

View file

@ -54,6 +54,13 @@ enum net_ip_protocol {
IPPROTO_ICMPV6 = 58,
};
/* Protocol numbers for TLS protocols */
enum net_ip_protocol_secure {
IPPROTO_TLS_1_0 = 256,
IPPROTO_TLS_1_1 = 257,
IPPROTO_TLS_1_2 = 258,
};
/** Socket type */
enum net_sock_type {
SOCK_STREAM = 1,