mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
Sniffer Update
1. Add ssl_SetWatchKeyCallback_ex() which was missing. 2. Fix linking issue with OCTEON libraries.
This commit is contained in:
@@ -3903,8 +3903,8 @@ AC_ARG_WITH([octeon-sync],
|
|||||||
AM_CFLAGS="$AM_CFLAGS -I$OCTEON_ROOT/executive"
|
AM_CFLAGS="$AM_CFLAGS -I$OCTEON_ROOT/executive"
|
||||||
|
|
||||||
#-I$OCTEON_ROOT/target/include
|
#-I$OCTEON_ROOT/target/include
|
||||||
LDFLAGS="$LDFLAGS -lrt -Xlinker -T -Xlinker $OCTEON_ROOT/executive/cvmx-shared-linux.ld"
|
AM_LDFLAGS="$AM_LDFLAGS -lrt -Xlinker -T -Xlinker $OCTEON_ROOT/executive/cvmx-shared-linux.ld"
|
||||||
LIBS="$LIBS $OCTEON_ROOT/executive/$OCTEON_OBJ/libcvmx.a $OCTEON_ROOT/executive/$OCTEON_OBJ/libfdt.a"
|
AM_LDFLAGS="$AM_LDFLAGS -L$OCTEON_ROOT/executive/$OCTEON_OBJ -lcvmx -lfdt"
|
||||||
|
|
||||||
enable_shared=no
|
enable_shared=no
|
||||||
enable_static=yes
|
enable_static=yes
|
||||||
|
@@ -513,6 +513,7 @@ void ssl_InitSniffer(void)
|
|||||||
CryptoDeviceId = wc_CryptoCb_InitOcteon();
|
CryptoDeviceId = wc_CryptoCb_InitOcteon();
|
||||||
if (INVALID_DEVID == CryptoDeviceId) {
|
if (INVALID_DEVID == CryptoDeviceId) {
|
||||||
printf("Couldn't init the Intel QA\n");
|
printf("Couldn't init the Intel QA\n");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -1433,7 +1434,7 @@ static int LoadKeyFile(byte** keyBuf, word32* keyBufSz,
|
|||||||
|
|
||||||
#ifdef WOLFSSL_SNIFFER_WATCH
|
#ifdef WOLFSSL_SNIFFER_WATCH
|
||||||
|
|
||||||
static int CreateWatchSnifferServer(char* error)
|
static int CreateWatchSnifferServer(char* error, int devId)
|
||||||
{
|
{
|
||||||
SnifferServer* sniffer;
|
SnifferServer* sniffer;
|
||||||
|
|
||||||
@@ -1452,7 +1453,7 @@ static int CreateWatchSnifferServer(char* error)
|
|||||||
}
|
}
|
||||||
#ifdef WOLF_CRYPTO_CB
|
#ifdef WOLF_CRYPTO_CB
|
||||||
if (CryptoDeviceId != INVALID_DEVID)
|
if (CryptoDeviceId != INVALID_DEVID)
|
||||||
wolfSSL_CTX_SetDevId(sniffer->ctx, CryptoDeviceId);
|
wolfSSL_CTX_SetDevId(sniffer->ctx, devId);
|
||||||
#endif
|
#endif
|
||||||
ServerList = sniffer;
|
ServerList = sniffer;
|
||||||
|
|
||||||
@@ -4503,10 +4504,17 @@ int ssl_ReadResetStatistics(SSLStats* stats)
|
|||||||
|
|
||||||
#ifdef WOLFSSL_SNIFFER_WATCH
|
#ifdef WOLFSSL_SNIFFER_WATCH
|
||||||
|
|
||||||
|
int ssl_SetWatchKeyCallback_ex(SSLWatchCb cb, int devId, char* error)
|
||||||
|
{
|
||||||
|
WatchCb = cb;
|
||||||
|
return CreateWatchSnifferServer(error, devId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int ssl_SetWatchKeyCallback(SSLWatchCb cb, char* error)
|
int ssl_SetWatchKeyCallback(SSLWatchCb cb, char* error)
|
||||||
{
|
{
|
||||||
WatchCb = cb;
|
WatchCb = cb;
|
||||||
return CreateWatchSnifferServer(error);
|
return CreateWatchSnifferServer(error, INVALID_DEVID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user