13#include <crypto/wolfssl/ssl.h>
14#include <crypto/NetBurner/CryptoSocket.h>
18#define SHUTDOWN_RETRY_INTERVAL_IMMEDIATE \
21#define SHUTDOWN_RETRY_INTERVAL (TICKS_PER_SECOND)
22#define CONNECT_RETRY_INTERVAL (TICKS_PER_SECOND)
24class SslSocket :
public CryptoSocket
30 uint16_t InitSocket(
int tcpFd, WOLFSSL_CTX *ctx,
const char *commonName, uint32_t sockFlags = 0,
int verifyPeer = -1);
32 void CleanupTcpClose();
36 void ProcessAsyncStuff()
override;
37 int CheckSocketRecv()
override;
38 uint32_t SocketRead(
char *buf, uint32_t len)
override;
39 uint32_t SocketWrite(
const char *buf, uint32_t len)
override;
40 SocketHasData_t SocketHasData()
override;
43 static SslSocket *GetNewSocket(
int tcpFd, WOLFSSL_CTX *ctx,
const char *commonName, uint32_t sockFlags = 0,
int verifyPeer = -1);
45 inline WOLFSSL *GetWolfSsl() {
return (WOLFSSL *)m_wolfCtx; }
47 static bool SocketsAvail();
48 static int FreeSockets();
53 void WriteUnwrittenData()
override;
56 static int DoTicketCallback(WOLFSSL *ssl,
const unsigned char *ticket,
int ticketLen,
void* pvSock);
58 static SslSocket *FindNextEmptySocket();
59 static SslSocket gSslSockets[];
60 static Pool gSslSocketPool;
61 friend void SSL_DumpSSLSockets();
62 friend void SSL_dumpJSONSockets(
int fd);
64 inline static const Pool *GetSocketPool() {
return &gSslSocketPool; }
#define SSL_ERROR_HANDSHAKE_INCOMPLETE
The SSL handshake is not complete yet.
Definition ssl.h:66
NetBurner Network Interface Header File.