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:
parent
00a69bf9bb
commit
a7c698d936
4 changed files with 191 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue