Browse Source

add test vector unit test

Florian Dold 3 years ago
parent
commit
2f03e8b0c3
3 changed files with 55 additions and 1 deletions
  1. 4 1
      src/util/Makefile.am
  2. 48 0
      src/util/crypto-test-vectors.json
  3. 3 0
      src/util/test_crypto_vectors.sh

+ 4 - 1
src/util/Makefile.am

@@ -169,7 +169,7 @@ noinst_PROGRAMS = \
 
 if ENABLE_TEST_RUN
 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
-TESTS = $(check_PROGRAMS)
+TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
 endif
 
 gnunet_timeout_SOURCES = \
@@ -255,6 +255,9 @@ if HAVE_SSH_KEY
 # SSH_USING_TESTS = test_socks.nc
 endif
 
+check_SCRIPTS = \
+ test_crypto_vectors.sh
+
 check_PROGRAMS = \
  test_bio \
  test_client.nc \

File diff suppressed because it is too large
+ 48 - 0
src/util/crypto-test-vectors.json


+ 3 - 0
src/util/test_crypto_vectors.sh

@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+cat ./crypto-test-vectors.json | ./gnunet-crypto-tvg --verify

Some files were not shown because too many files changed in this diff