From 76cc80075089460f57cb3498077a89911a17de89 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Wed, 12 Apr 2017 11:41:36 -0600 Subject: [PATCH] update ED25519 examples based on feedback --- signature/ED25519/Makefile | 4 ++-- signature/ED25519/README | 8 ++++++++ signature/ED25519/gen_key_files.c | 4 ++++ signature/ED25519/sign_and_verify.c | 4 ++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/signature/ED25519/Makefile b/signature/ED25519/Makefile index 9dc7b85a..c704647c 100644 --- a/signature/ED25519/Makefile +++ b/signature/ED25519/Makefile @@ -15,8 +15,8 @@ LIBRARIES := #example: if using custom install location add the include and lib dir to the # INCLUDE_DIRS and LIBRARY_DIRS respectively -#INCLUDE_DIRS += /Users/khimes/work/testDir/wolf-install-dir-for-testing/include -#LIBRARY_DIRS += /Users/khimes/work/testDir/wolf-install-dir-for-testing/lib +#INCLUDE_DIRS += /path-to-custom/wolf-install-dir-for-testing/include +#LIBRARY_DIRS += /path-to-custom/wolf-install-dir-for-testing/lib LIBRARIES += wolfssl CPPFLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir)) diff --git a/signature/ED25519/README b/signature/ED25519/README index 3bf1c091..cac8cb1b 100644 --- a/signature/ED25519/README +++ b/signature/ED25519/README @@ -1,3 +1,11 @@ +Configure and install wolfSSL with these options: + +./configure --enable-ed25519 +make +make install + +(if any build issues due to previous installations please run 'ldconfig`) + To compile without Makefile: gcc -o gen_key_files gen_key_files.c -lwolfssl diff --git a/signature/ED25519/gen_key_files.c b/signature/ED25519/gen_key_files.c index c33d1923..f904aae8 100644 --- a/signature/ED25519/gen_key_files.c +++ b/signature/ED25519/gen_key_files.c @@ -3,6 +3,10 @@ #include #include +#ifndef HAVE_ED25519 + #error "Please build wolfSSL with the --enable-ed25519 option" +#endif + int create_and_output_ed_key(void); static int err_sys(const char* msg, int es); diff --git a/signature/ED25519/sign_and_verify.c b/signature/ED25519/sign_and_verify.c index 59288107..d9f17964 100644 --- a/signature/ED25519/sign_and_verify.c +++ b/signature/ED25519/sign_and_verify.c @@ -8,6 +8,10 @@ #define USE_CERT_BUFFERS_ED #include "test_keys.h" +#ifndef HAVE_ED25519 + #error "Please build wolfSSL with the --enable-ed25519 option" +#endif + static int err_sys(const char* msg, int es); static int err_sys(const char* msg, int es)