unit-tests: Export ntru_drbg_create as testable function so no linking is required
This way the plugin does not have to be linked explicitly to the test runner, which otherwise would require that the plugin is either always enabled to build the tests or that ifdefs are added to the Makefile.
This commit is contained in:
committed by
Andreas Steffen
parent
4cea186b64
commit
d5a0abfa92
@@ -53,5 +53,4 @@ tests_CFLAGS = \
|
||||
tests_LDFLAGS = @COVERAGE_LDFLAGS@
|
||||
tests_LDADD = \
|
||||
$(top_builddir)/src/libstrongswan/libstrongswan.la \
|
||||
$(top_builddir)/src/libstrongswan/plugins/ntru/libstrongswan-ntru.la \
|
||||
libtest.la
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
#include <tests/utils/test_rng.h>
|
||||
#include <plugins/ntru/ntru_drbg.h>
|
||||
#include <utils/test.h>
|
||||
|
||||
IMPORT_FUNCTION_FOR_TESTS(ntru, ntru_drbg_create, ntru_drbg_t*,
|
||||
u_int32_t strength, chunk_t pers_str, rng_t *entropy)
|
||||
|
||||
/**
|
||||
* NTRU parameter sets to test
|
||||
|
||||
Reference in New Issue
Block a user