forked from wolfSSL/wolfssl
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"
|
||||
|
||||
#-I$OCTEON_ROOT/target/include
|
||||
LDFLAGS="$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 -lrt -Xlinker -T -Xlinker $OCTEON_ROOT/executive/cvmx-shared-linux.ld"
|
||||
AM_LDFLAGS="$AM_LDFLAGS -L$OCTEON_ROOT/executive/$OCTEON_OBJ -lcvmx -lfdt"
|
||||
|
||||
enable_shared=no
|
||||
enable_static=yes
|
||||
|
@@ -513,6 +513,7 @@ void ssl_InitSniffer(void)
|
||||
CryptoDeviceId = wc_CryptoCb_InitOcteon();
|
||||
if (INVALID_DEVID == CryptoDeviceId) {
|
||||
printf("Couldn't init the Intel QA\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -1433,7 +1434,7 @@ static int LoadKeyFile(byte** keyBuf, word32* keyBufSz,
|
||||
|
||||
#ifdef WOLFSSL_SNIFFER_WATCH
|
||||
|
||||
static int CreateWatchSnifferServer(char* error)
|
||||
static int CreateWatchSnifferServer(char* error, int devId)
|
||||
{
|
||||
SnifferServer* sniffer;
|
||||
|
||||
@@ -1452,7 +1453,7 @@ static int CreateWatchSnifferServer(char* error)
|
||||
}
|
||||
#ifdef WOLF_CRYPTO_CB
|
||||
if (CryptoDeviceId != INVALID_DEVID)
|
||||
wolfSSL_CTX_SetDevId(sniffer->ctx, CryptoDeviceId);
|
||||
wolfSSL_CTX_SetDevId(sniffer->ctx, devId);
|
||||
#endif
|
||||
ServerList = sniffer;
|
||||
|
||||
@@ -4503,10 +4504,17 @@ int ssl_ReadResetStatistics(SSLStats* stats)
|
||||
|
||||
#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)
|
||||
{
|
||||
WatchCb = cb;
|
||||
return CreateWatchSnifferServer(error);
|
||||
return CreateWatchSnifferServer(error, INVALID_DEVID);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user