mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
Sync OCTEON fix
1. The sniffer's global device ID wasn't tagged as global. 2. Make sure the sniffer's global device ID is used.
This commit is contained in:
@@ -487,7 +487,7 @@ static void UpdateMissedDataSessions(void)
|
|||||||
|
|
||||||
|
|
||||||
#ifdef WOLF_CRYPTO_CB
|
#ifdef WOLF_CRYPTO_CB
|
||||||
static int CryptoDeviceId = INVALID_DEVID;
|
static WOLFSSL_GLOBAL int CryptoDeviceId = INVALID_DEVID;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -1434,7 +1434,7 @@ static int LoadKeyFile(byte** keyBuf, word32* keyBufSz,
|
|||||||
|
|
||||||
#ifdef WOLFSSL_SNIFFER_WATCH
|
#ifdef WOLFSSL_SNIFFER_WATCH
|
||||||
|
|
||||||
static int CreateWatchSnifferServer(char* error, int devId)
|
static int CreateWatchSnifferServer(char* error)
|
||||||
{
|
{
|
||||||
SnifferServer* sniffer;
|
SnifferServer* sniffer;
|
||||||
|
|
||||||
@@ -1453,7 +1453,7 @@ static int CreateWatchSnifferServer(char* error, int devId)
|
|||||||
}
|
}
|
||||||
#ifdef WOLF_CRYPTO_CB
|
#ifdef WOLF_CRYPTO_CB
|
||||||
if (CryptoDeviceId != INVALID_DEVID)
|
if (CryptoDeviceId != INVALID_DEVID)
|
||||||
wolfSSL_CTX_SetDevId(sniffer->ctx, devId);
|
wolfSSL_CTX_SetDevId(sniffer->ctx, CryptoDeviceId);
|
||||||
#endif
|
#endif
|
||||||
ServerList = sniffer;
|
ServerList = sniffer;
|
||||||
|
|
||||||
@@ -3753,7 +3753,7 @@ static int CheckPreRecord(IpInfo* ipInfo, TcpInfo* tcpInfo,
|
|||||||
word32 i, offset, headerSz, qty, remainder;
|
word32 i, offset, headerSz, qty, remainder;
|
||||||
|
|
||||||
Trace(CHAIN_INPUT_STR);
|
Trace(CHAIN_INPUT_STR);
|
||||||
headerSz = (word64)*sslFrame - (word64)chain[0].iov_base;
|
headerSz = (word32)*sslFrame - (word32)chain[0].iov_base;
|
||||||
remainder = *sslBytes;
|
remainder = *sslBytes;
|
||||||
|
|
||||||
if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {
|
if ( (*sslBytes + length) > ssl->buffers.inputBuffer.bufferSize) {
|
||||||
@@ -4506,15 +4506,16 @@ int ssl_ReadResetStatistics(SSLStats* stats)
|
|||||||
|
|
||||||
int ssl_SetWatchKeyCallback_ex(SSLWatchCb cb, int devId, char* error)
|
int ssl_SetWatchKeyCallback_ex(SSLWatchCb cb, int devId, char* error)
|
||||||
{
|
{
|
||||||
|
(void)devId;
|
||||||
WatchCb = cb;
|
WatchCb = cb;
|
||||||
return CreateWatchSnifferServer(error, devId);
|
return CreateWatchSnifferServer(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int ssl_SetWatchKeyCallback(SSLWatchCb cb, char* error)
|
int ssl_SetWatchKeyCallback(SSLWatchCb cb, char* error)
|
||||||
{
|
{
|
||||||
WatchCb = cb;
|
WatchCb = cb;
|
||||||
return CreateWatchSnifferServer(error, INVALID_DEVID);
|
return CreateWatchSnifferServer(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user