wolfCrypt

1. Add call to wolfCrypt_Init() to wolfSSH_Init().
2. Modify have_wolfssl.m4 to check for wolfCrypt, not wolfSSL.
pull/18/head
John Safranek 2016-10-05 10:55:30 -07:00
parent db57a01613
commit 2cf5ad63ac
2 changed files with 10 additions and 4 deletions

View File

@ -12,9 +12,9 @@ AC_DEFUN([_TAO_SEARCH_LIBWOLFSSL],[
AC_LIB_HAVE_LINKFLAGS(wolfssl,,
[
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/wc_port.h>
],[
wolfSSL_Init();
wolfCrypt_Init();
])
AM_CONDITIONAL(HAVE_LIBWOLFSSL, [test "x${ac_cv_libwolfssl}" = "xyes"])

View File

@ -33,6 +33,7 @@
#include <wolfssh/log.h>
#include <wolfssl/wolfcrypt/rsa.h>
#include <wolfssl/wolfcrypt/asn.h>
#include <wolfssl/wolfcrypt/wc_port.h>
#ifdef NO_INLINE
#include <wolfssh/misc.h>
@ -44,9 +45,14 @@
int wolfSSH_Init(void)
{
int ret = WS_SUCCESS;
WLOG(WS_LOG_DEBUG, "Entering wolfSSH_Init()");
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_Init(), returning %d", WS_SUCCESS);
return WS_SUCCESS;
if (wolfCrypt_Init() != 0)
ret = WS_CRYPTO_FAILED;
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_Init(), returning %d", ret);
return ret;
}