Sniffer Update

1. Add ssl_SetWatchKeyCallback_ex() which was missing.
2. Fix linking issue with OCTEON libraries.
This commit is contained in:
John Safranek
2019-10-23 15:01:41 -07:00
parent b8f4b1a712
commit 954d1ad13e
2 changed files with 13 additions and 5 deletions

View File

@@ -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

View File

@@ -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);
}