mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
add check on NETX duo build and return value of opening driver
This commit is contained in:
@@ -2324,7 +2324,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||
word32 len = sz;
|
||||
|
||||
ret = g_sce_trng.p_api->open(g_sce_trng.p_ctrl, g_sce_trng.p_cfg);
|
||||
if (ret != SSP_SUCCESS) {
|
||||
if (ret != SSP_SUCCESS && ret != SSP_ERR_CRYPTO_ALREADY_OPEN) {
|
||||
/* error opening TRNG driver */
|
||||
return -1;
|
||||
}
|
||||
|
@@ -229,7 +229,8 @@ int wolfCrypt_Init(void)
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SCE
|
||||
if ((ret = g_sce.p_api->open(g_sce.p_ctrl, g_sce.p_cfg)) != SSP_SUCCESS) {
|
||||
ret = (int)g_sce.p_api->open(g_sce.p_ctrl, g_sce.p_cfg);
|
||||
if (ret != SSP_SUCCESS && ret != SSP_ERR_CRYPTO_ALREADY_OPEN) {
|
||||
WOLFSSL_MSG("Error opening SCE\n");
|
||||
return -1; /* FATAL_ERROR */
|
||||
}
|
||||
|
@@ -83,7 +83,11 @@
|
||||
#elif defined(WOLFSSL_IAR_ARM)
|
||||
/* nothing */
|
||||
#elif defined(HAVE_NETX_BSD)
|
||||
#include "nx_bsd.h"
|
||||
#ifdef NETX_DUO
|
||||
#include "nxd_bsd.h"
|
||||
#else
|
||||
#include "nx_bsd.h"
|
||||
#endif
|
||||
#elif defined(WOLFSSL_VXWORKS)
|
||||
#include <sockLib.h>
|
||||
#include <errno.h>
|
||||
|
Reference in New Issue
Block a user