Commit Graph

37 Commits (87098d3324e018fd05c1729998052603391a4e71)

Author SHA1 Message Date
Johannes Berg 87098d3324 build: Put archive files into build/ folder too
This is something I hadn't previously done, but there are
cases where it's needed, e.g., building 'wlantest' and then
one of the tests/fuzzing/*/ projects, they use a different
configuration (fuzzing vs. not fuzzing).

Perhaps more importantly, this gets rid of the last thing
that was dumped into the source directories, apart from
the binaries themselves.

Note that due to the use of thin archives, this required
building with absolute paths.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg b3313939b7 tests: Use new build system for the tests
I had previously kept that building in the sources, but
we can also change that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg 722138cd25 build: Put object files into build/ folder
Instead of building in the source tree, put most object
files into the build/ folder at the root, and put each
thing that's being built into a separate folder.

This then allows us to build hostapd and wpa_supplicant
(or other combinations) without "make clean" inbetween.

For the tests keep the objects in place for now (and to
do that, add the build rule) so that we don't have to
rewrite all of that with $(call BUILDOBJS,...) which is
just noise there.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg 0430bc8267 build: Add a common-clean target
Clean up in a more common fashion as well, initially for ../src/.

Also add $(Q) to the clean target in src/

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Johannes Berg a41a29192e build: Pull common fragments into a build.rules file
Some things are used by most of the binaries, pull them
into a common rule fragment that we can use properly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
4 years ago
Jouni Malinen 63ccec5433 tests: Remove test-x509
This has been obsoleted by tests/fuzzing/x509.

Signed-off-by: Jouni Malinen <j@w1.fi>
4 years ago
Jouni Malinen 7d2ed8bae8 Remove CONFIG_IEEE80211W build parameter
Hardcode this to be defined and remove the separate build options for
PMF since this functionality is needed with large number of newer
protocol extensions and is also something that should be enabled in all
WPA2/WPA3 networks.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Jouni Malinen f3e671591e tests: libFuzzer integration for test-json and test-x509
Allow these test tools to be used with libFuzzer in addition to
afl-fuzz.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Jouni Malinen 525923b1d7 tests: EAPOL-Key fuzzing tool
Add test-eapol program that can be used for fuzzing the EAPOL-Key
Supplicant and Authenticator implementations. This tool can write
Supplicant or Authenticator messages into a file as an initialization
step and for the fuzzing step, that file (with potential modifications)
can be used to replace the internally generated message contents.

The TEST_FUZZ=y build parameter is used to make a special build where a
hardcoded random number generator and hardcoded timestamp are used to
force deterministic behavior for the EAPOL-Key operations. This will
also make the implementation ignore Key MIC and AES keywrap errors to
allow processing of modified messages to continue further.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Jouni Malinen 79fa1b4530 tests: JSON parser fuzzer
test-json can be used for fuzz testing the JSON parser implementation in
src/utils/json.c.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Jouni Malinen 1ac9c020b5 tests: TLS fuzzing tool
Add test-tls program that can be used for fuzzing the internal TLS
client and server implementations. This tool can write client or server
messages into a file as an initialization step and for the fuzzing step,
that file (with potential modifications) can be used to replace the
internally generated message contents.

The TEST_FUZZ=y build parameter is used to make a special build where a
hardcoded random number generator and hardcoded timestamp are used to
force deterministic behavior for the TLS operations.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Jouni Malinen b49ec25979 tests: Add a simple HTTPS server for TLS testing
This makes it easier to use TLS testing tools against the internal TLS
implementation.

Signed-off-by: Jouni Malinen <j@w1.fi>
5 years ago
Jouni Malinen 896e1b836f tests: Move MD5 test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
10 years ago
Jouni Malinen 88fc0dca98 tests: Move ms_funcs test cases into hwsim framework
Signed-off-by: Jouni Malinen <j@w1.fi>
10 years ago
Jouni Malinen 8b0980af50 tests: Move bitfield unit tests into wpa_supplicant module test
Signed-off-by: Jouni Malinen <j@w1.fi>
10 years ago
Jouni Malinen 8860e0f47c tests: Add printf encoding/decoding module tests
This replaces tests/test-printf.c.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years ago
Jouni Malinen 46fcf474ff tests: Add CAVP test vectors for RSA/PKCS #1 v1.5 signature validation
This allow the PKCS #1 and RSA implementation to be validated against
the test vectors from
http://csrc.nist.gov/groups/STM/cavp/documents/dss/186-2rsatestvectors.zip
and
http://csrc.nist.gov/groups/STM/cavp/documents/dss/SigVer15EMTest.txt.

Signed-off-by: Jouni Malinen <j@w1.fi>
10 years ago
Jouni Malinen 6be79541ad tests: Fix unit test linking after reltime changes
librt needs to be linked in with older glibc versions.

Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen bdb112d35f Add bitfield routines
Signed-hostap: Jouni Malinen <j@w1.fi>
11 years ago
Jouni Malinen 565bb65d5c Fix test-{md5,sha1} builds
These need to include the libraries to fix aliasing_hide_typecast()
in md5-internal.c.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
11 years ago
Jouni Malinen c2372d7cf0 Add AES-GCM test vectors from gcm-spec.pdf
Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 0d7773b63f Add routines for encoding/decoding printf escaping mechanism
This can be used to build ASCII strings from binary data that is
more likely to use ASCII (i.e., text format is more natural
option than hexdump, but there is possibility of some non-ASCII
characters).

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen b87346c41a Remove test-https on "make clean"
This is not included in the TESTS list, but should be removed anyway.

Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen f551fa8d50 Add test program for RC4 (test vectors from RFC 6229)
Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen d10b13982d Add test-https for testing internal TLS client functionality
This tool can be used to test the internal TLS client implementation
against HTTPS servers.

Signed-hostap: Jouni Malinen <j@w1.fi>
13 years ago
Jouni Malinen dacf478352 Add generic doubly-linked list implementation 15 years ago
Jouni Malinen 655702f38d Move test_x509v3 into the new tests subdirectory 15 years ago
Jouni Malinen 0bc377fa93 Resolve circular library references with --start-group
src/crypto/libcrypto.a and src/tls/libtls.a have circular references
and will need special handling with the linker at least for the time
being. This could be cleaned up eventually, but for now, provide a
mechanism to get the programs linked.
15 years ago
Jouni Malinen ab7ddc74ad Move asn1_test.c into tests subdirectory and split it in two
The new test-asn1 and test-x509 tools are built using libraries
from src/{utils,crypto,tls}. Currently, cross dependencies between
crypto and tls are still preventing the test-x509 from being linked
properly.
15 years ago
Jouni Malinen f8cf3ce6a6 Move more tests from wpa_supplicant/tests into tests 15 years ago
Jouni Malinen c7ab5122a7 Use simpler make rules for test programs 15 years ago
Jouni Malinen 668562d5fb Move MD4 test from wpa_supplicant/tests into tests 15 years ago
Jouni Malinen 631afd993f Add rules for building src/crypto as a library
For now, this is hardcoded to support only the internal crypto
implementation.
15 years ago
Jouni Malinen 6a230ba274 Add build rules for building a library from src/utils files
This is an initial step on providing an alternative build system that
uses libraries from src subdirectories.
15 years ago
Jouni Malinen 953f83439b Move Milenage test code into the new tests directory 15 years ago
Jouni Malinen 8ad733d5ea Use auto-generated dependency files and clean them 15 years ago
Jouni Malinen 1801bd7fae Move base64 test code into a new tests subdirectory 15 years ago