address review items

pull/135/head
kaleb-himes 2019-04-30 13:19:53 -06:00
parent e294a5dba8
commit e0108ed42f
2 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,4 @@
CC=gcc CC=gcc -fsanitize=address
#if you installed wolfssl to an alternate location use CFLAGS and LIBS to #if you installed wolfssl to an alternate location use CFLAGS and LIBS to
#control your build: #control your build:
#CFLAGS=-Wall -I/path/to/include #CFLAGS=-Wall -I/path/to/include
@ -9,8 +9,7 @@ CC=gcc
#LIBS=-L/Users/khimes/work/testDir/wolf-install-dir-for-testing/lib -lwolfssl #LIBS=-L/Users/khimes/work/testDir/wolf-install-dir-for-testing/lib -lwolfssl
#END EXAMPLE #END EXAMPLE
#WOLF_INSTALL_DIR=/usr/local WOLF_INSTALL_DIR=/usr/local
WOLF_INSTALL_DIR=/Users/kalebhimes/work/testDir/wolf-install-dir-for-testing
CFLAGS=-I$(WOLF_INSTALL_DIR)/include -Wall CFLAGS=-I$(WOLF_INSTALL_DIR)/include -Wall
LIBS=-L$(WOLF_INSTALL_DIR)/lib -lwolfssl LIBS=-L$(WOLF_INSTALL_DIR)/lib -lwolfssl

View File

@ -11,7 +11,8 @@ int main(void)
!defined(WOLFSSL_CERT_GEN) !defined(WOLFSSL_CERT_GEN)
printf("The csr_w_ed25519_example will not work unless wolfSSL is\n" printf("The csr_w_ed25519_example will not work unless wolfSSL is\n"
"configured with the following settings:\n" "configured with the following settings:\n"
"--enable-ed25519 --enable-certreq --enable-certgen\n"); "--enable-ed25519 --enable-certreq --enable-certgen --enable-keygen"
"\n");
return 0; return 0;
#else #else
int ret; int ret;
@ -21,6 +22,9 @@ int main(void)
byte der[MAX_TEMP_SIZE], pem[MAX_TEMP_SIZE]; byte der[MAX_TEMP_SIZE], pem[MAX_TEMP_SIZE];
int derSz, pemSz; int derSz, pemSz;
XMEMSET(&rng, 0, sizeof(rng));
XMEMSET(&key, 0, sizeof(key));
ret = wc_ed25519_init(&key); ret = wc_ed25519_init(&key);
if (ret != 0) { if (ret != 0) {
printf("ECC init key failed: %d\n", ret); printf("ECC init key failed: %d\n", ret);