Merge pull request #18 from ejohnstown/wolfCrypt

wolfCrypt
pull/19/head
JacobBarthelmeh 2016-10-05 13:26:04 -06:00 committed by GitHub
commit 69a6fbccb1
3 changed files with 11 additions and 4 deletions

View File

@ -31,6 +31,7 @@
#include <sys/socket.h>
#include <stdio.h>
#include <pthread.h>
#include <wolfssl/options.h>
#include <wolfssl/wolfcrypt/sha256.h>
#include <wolfssl/wolfcrypt/coding.h>
#include <wolfssh/ssh.h>

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