5#ifndef _CRYPTO_SERVER_H_
6#define _CRYPTO_SERVER_H_
9#if defined(NB_SSL_SUPPORTED) || defined(NB_SSH_SUPPORTED)
11#include <crypto/NetBurner/CryptoSocket.h>
14enum CryptoServerErrors : int16_t
16 eCryptoServerErrorInvalidSocketType = -1
19enum CryptoQueueAction :
unsigned char
21 eCryptoQueueActionError = 1,
22 eCryptoQueueActionTcpRead = 2,
23 eCryptoQueueActionTcpClose = 3,
24 eCryptoQueueActionExtraFdClose = 4
27int ioReturnCode(
int n,
int tcpFd, SocketType_t sockType);
29void InitCryptoServer();
30void PostCryptoQueueData(CryptoSocket *sck, CryptoQueueAction action);
32void CryptoReadNotify(
int fd);
33void CryptoWriteNotify(
int fd);
35int WolfCryptoCbIoRecv(
int tcp,
char *buf,
int len,
void *ctx, SocketType_t sckType);
36int WolfCryptoCbIoSend(
int tcp,
char *buf,
int len,
void *ctx, SocketType_t sckType);
38int WolfCryptoExtraFdRead(
int fd,
char *buf,
int nbytes);
39int WolfCryptoExtraFdWrite(
int fd,
const char *buf,
int nbytes);
40int WolfCryptoExtraFdClose(
int extra_fd);