summaryrefslogtreecommitdiffstats
path: root/demos/kdf
diff options
context:
space:
mode:
Diffstat (limited to 'demos/kdf')
-rw-r--r--demos/kdf/Makefile20
-rw-r--r--demos/kdf/argon2.c2
-rw-r--r--demos/kdf/hkdf.c2
-rw-r--r--demos/kdf/pbkdf2.c2
-rw-r--r--demos/kdf/scrypt.c2
5 files changed, 20 insertions, 8 deletions
diff --git a/demos/kdf/Makefile b/demos/kdf/Makefile
index 28ad7209b1..81efbeeff7 100644
--- a/demos/kdf/Makefile
+++ b/demos/kdf/Makefile
@@ -1,24 +1,28 @@
#
-# To run the demos when linked with a shared library (default):
+# To run the demos when linked with a shared library (default) ensure that
+# libcrypto is on the library path. For example:
#
# LD_LIBRARY_PATH=../.. ./hkdf
-CFLAGS = -I../../include -g
-LDFLAGS = -L../..
-LDLIBS = -lcrypto
+TESTS = hkdf \
+ pbkdf2 \
+ scrypt \
+ argon2
-TESTS=hkdf pbkdf2 scrypt argon2
+CFLAGS = -I../../include -g -Wall
+LDFLAGS = -L../..
+LDLIBS = -lcrypto
all: $(TESTS)
-%.o: %.c
- $(CC) $(CFLAGS) -c $<
-
hkdf: hkdf.o
pbkdf2: pbkdf2.o
scrypt: scrypt.o
argon2: argon2.o
+$(TESTS):
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
clean:
$(RM) *.o $(TESTS)
diff --git a/demos/kdf/argon2.c b/demos/kdf/argon2.c
index b6a1590328..6c542d54ed 100644
--- a/demos/kdf/argon2.c
+++ b/demos/kdf/argon2.c
@@ -145,6 +145,8 @@ int main(int argc, char **argv)
goto end;
}
+ printf("Success\n");
+
rv = EXIT_SUCCESS;
end:
EVP_KDF_CTX_free(kctx);
diff --git a/demos/kdf/hkdf.c b/demos/kdf/hkdf.c
index 8d7c436575..9818d61afe 100644
--- a/demos/kdf/hkdf.c
+++ b/demos/kdf/hkdf.c
@@ -95,6 +95,8 @@ int main(int argc, char **argv)
goto end;
}
+ printf("Success\n");
+
ret = EXIT_SUCCESS;
end:
EVP_KDF_CTX_free(kctx);
diff --git a/demos/kdf/pbkdf2.c b/demos/kdf/pbkdf2.c
index ae9a9d726c..28a075513c 100644
--- a/demos/kdf/pbkdf2.c
+++ b/demos/kdf/pbkdf2.c
@@ -108,6 +108,8 @@ int main(int argc, char **argv)
goto end;
}
+ printf("Success\n");
+
ret = EXIT_SUCCESS;
end:
EVP_KDF_CTX_free(kctx);
diff --git a/demos/kdf/scrypt.c b/demos/kdf/scrypt.c
index 5c07ebffbd..a1c33f5963 100644
--- a/demos/kdf/scrypt.c
+++ b/demos/kdf/scrypt.c
@@ -111,6 +111,8 @@ int main(int argc, char **argv)
goto end;
}
+ printf("Success\n");
+
ret = EXIT_SUCCESS;
end:
EVP_KDF_CTX_free(kctx);