1

(3 replies, posted in wolfCrypt)

It works now.

I had not specified the library as -lwolfssl while compiling my code using gcc!

2

(3 replies, posted in wolfCrypt)

Hi kareem_wolfssl,

I have latest release from GitHub. I built it with default ./configure i.e. without any options.

I believe SHA is enabled, I see following configure status when I build:

   * SHA:                        yes
   * SHA-224:                  yes
   * SHA-384:                  yes
   * SHA-512:                  yes
   * SHA3:                       yes

3

(3 replies, posted in wolfCrypt)

Hi,

I have run into following error:
/tmp/ccrfx1RK.o: In function `main':
sha.c:(.text+0x3d): undefined reference to `wc_InitSha'
sha.c:(.text+0x58): undefined reference to `wc_ShaUpdate'
sha.c:(.text+0x6e): undefined reference to `wc_ShaFinal'
collect2: error: ld returned 1 exit status

The code I am trying to compile is as follows:

#include <wolfssl/options.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/sha.h>

int main()
{
  int ret = 0;
  char hash[20];

  char string[8] = "Test sha";

  Sha sha[1];
  wc_InitSha(sha);
  wc_ShaUpdate(sha, string, 8);
  wc_ShaFinal(sha, hash);

}


I have installed wolfSSL per instruction for Linux and the tests ran fine.
I would appreciate any help to get over this blocker.