NetBurner 3.5.8
PDF Version
Toggle main menu visibility
SslClientSession.h
1
/*NB_REVISION*/
2
3
/*NB_COPYRIGHT*/
4
5
#ifndef _SSL_SESSION_ID_H_
6
#define _SSL_SESSION_ID_H_
7
8
#include <predef.h>
9
#ifdef NB_SSL_SUPPORTED
10
11
#include <buffers.h>
12
#include <tcp.h>
13
#include <netinterface.h>
14
15
#include <crypto/wolfssl/ssl.h>
16
#include <crypto/NetBurner/SslSocket.h>
17
18
// Used for session resumption with session ID's
19
class
SslClientSession
20
{
21
struct
ticketAlloc {
22
int
allocSz;
23
int
ticketLen;
24
uint8_t ticket;
25
};
26
27
struct
nameAlloc {
28
29
};
30
public
:
31
~SslClientSession();
32
33
inline
void
SetSession(
IPADDR
&ip,
int
port, WOLFSSL_SESSION *session,
int
ticketLen);
34
void
ClearSession();
35
36
37
IPADDR
m_ipAddr =
IPADDR::NullIP
();
38
int
m_port = 0;
39
OS_CRIT m_Crit;
// Critical seciton to keep wolf multithread safe
40
WOLFSSL_SESSION *m_session =
nullptr
;
41
#ifdef HAVE_SESSION_TICKET
42
ticketAlloc *ticket;
43
#endif
44
};
45
46
WOLFSSL_SESSION *FindSession(
IPADDR
&ipAddr,
int
port);
47
bool
SaveSession(
IPADDR
&ipAddr,
int
port, WOLFSSL_SESSION *session,
int
ticketLen);
48
void
ClearSession(
IPADDR
&ipAddr,
int
port);
49
50
#endif
/* NB_SSL_SUPPORTED */
51
#endif
// _SSL_SESSION_ID_H_
IPADDR6::NullIP
static IPADDR6 NullIP()
Static function to return a null IPADDR6 object.
IPADDR
IPADDR6 IPADDR
IPADDR Object Type (either v4 or v6).
Definition
nettypes.h:568
libraries
include
crypto
NetBurner
SslClientSession.h
Generated by
1.18.0