Skip to content

Commit

Permalink
Merge pull request wolfSSL#18 from ejohnstown/wolfCrypt
Browse files Browse the repository at this point in the history
wolfCrypt
  • Loading branch information
JacobBarthelmeh committed Oct 5, 2016
2 parents db57a01 + b0d318f commit 69a6fbc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/echoserver/echoserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions m4/have_wolfssl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
10 changes: 8 additions & 2 deletions src/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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;
}


Expand Down

0 comments on commit 69a6fbc

Please sign in to comment.