aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* unit-tests: Created separate mgf1 test suiteAndreas Steffen2014-11-294-140/+261
|
* Moved mgf1 class to libstrongswan/crypto/mgf1Andreas Steffen2014-11-291-18/+10
|
* unit-tests: Test cancellability of some cancellation points we rely onMartin Willi2014-11-211-0/+192
|
* host: Ignore spaces around - when parsing rangesTobias Brunner2014-10-301-2/+8
|
* host: Add function to create two hosts from a range definitionTobias Brunner2014-10-301-0/+83
|
* constraints: Add permitted/excludedNameConstraints checkMartin Willi2014-10-303-0/+400
|
* constraints: Add requireExplicitPolicy testsMartin Willi2014-10-301-0/+44
|
* constraints: Add inhibitAnyPolicy testsMartin Willi2014-10-301-0/+44
|
* constraints: Add inhibitPolicyMapping testsMartin Willi2014-10-301-4/+83
|
* constraints: Add certificate policy and policy mapping unit testsMartin Willi2014-10-303-0/+472
|
* identification: Support custom types in string constructor prefixesMartin Willi2014-10-301-0/+6
|
* identification: Support prefixes in string constructors for an explicit typeMartin Willi2014-10-301-0/+4
|
* unit-tests: Re-align identification_create_from_string() unit test table dataMartin Willi2014-10-301-52/+52
|
* threading: Add a more explicit rwlock try_write_lock() testingMartin Willi2014-10-301-0/+44
|
* unit-tests: Fix internet checksum tests on big-endian systemsTobias Brunner2014-10-231-4/+9
| | | | | | | We actually need to do a byte-swap, which ntohs() only does on little-endian systems. Fixes #747.
* process: Don't use the shells built-in echo in testsMartin Willi2014-10-141-1/+1
| | | | On OS X, the /bin/sh built-in echo does not support -n.
* process: Don't use absolute path names for true/false/cat in unit testsMartin Willi2014-10-141-4/+10
| | | | | But use the (builtin) shell commands instead, as on OS X true/false are under /usr/bin.
* process: Add a wrapper to invoke a command under the system default shellMartin Willi2014-10-061-0/+16
|
* process: Port child process spawning to the Windows platformMartin Willi2014-10-061-0/+32
|
* process: Provide an abstraction to spawn child processes with redirected I/OMartin Willi2014-10-063-0/+175
|
* unit-tests: Give worker threads time to clean up when testing thread_t.detach()Tobias Brunner2014-09-091-2/+4
|
* unit-tests: Add option to exclude specific test suitesTobias Brunner2014-09-092-14/+32
| | | | | Listing test suites in TESTS_SUITES_EXCLUDE allows excluding specific test suites from running.
* chunk: Add function to calculate Internet Checksums according to RFC 1071Tobias Brunner2014-07-221-0/+49
|
* settings: Allow spaces in time settings before the optional unitMartin Willi2014-07-071-2/+2
|
* settings: Be more strict in converting settings to specific data typesMartin Willi2014-07-071-20/+15
| | | | | | | As the behavior was inconsistent for empty strings or strings with characters appended to a number, testing the code failed on some platforms. The new rules are more strict, returning the default if additional characters or an empty string was found for a setting.
* unit-tests: Add tests for DH factoryTobias Brunner2014-06-201-0/+157
|
* unit-tests: Add test for crypto_factory_t's rng_create methodTobias Brunner2014-06-203-0/+157
|
* unit-tests: Make fixture functions optionalTobias Brunner2014-06-191-2/+8
|
* identification: Only use either , or / to separate RDNsTobias Brunner2014-06-181-4/+4
| | | | | If a DN starts with a slash (or whitespace and a slash) slashes will be used, otherwise commas.
* windows: Use WINAPI call convention for Windows API callbacksMartin Willi2014-06-061-2/+2
| | | | | For x86_64 it does not actually matter, but for i686 builds the call convention is different with WINAPI.
* unit-tests: Zero-initialize chunk to avoid free on non-successful fetchMartin Willi2014-06-041-1/+1
| | | | | If the fetch fails, the fetcher is not required to return an empty chunk. Avoid the resulting invalid free() by initializing data.ptr to NULL.
* unit-tests: Support testable functions on Windows, avoid weak GCC symbolsMartin Willi2014-06-041-28/+5
| | | | | | | Instead of using weak symbols, we use dlsym() on Windows to find an arbitrary symbol in libtest to detect its linkage. Instead of creating the associated hashtable in the test runner, we maintain it in libstrongswan, making it significantly simpler.
* unit-tests: Seed chunk_hash() only once, but before creating any hashtablesMartin Willi2014-06-041-0/+3
| | | | | | | Due to the removal of pthread_once, we manually create the seed for chunk_hash(). With the new testable functions interface, this won't work for the hashtable initiated using __attribute__((constructor)). Enforce seeding before creating that hashtable.
* unit-tests: Force a CET/CEST timezone Windows understandsMartin Willi2014-06-041-0/+4
| | | | | | As it is currently unclear what the "three-letter-timezone" for CEST is, we use the German timezone, which actually is CET/CEST. SetEnvironmentVariable() "TZ" does not seem to affect localtime(), so we use _putenv() instead.
* unit-tests: Adapt settings tests for WindowsMartin Willi2014-06-041-2/+13
|
* utils: Provide a path_absolute() function to check path for non-relativenessMartin Willi2014-06-041-38/+53
| | | | The usually used trivial '/' check won't work on Windows platforms.
* utils: Support Windows path separators in path_basename/dirnameMartin Willi2014-06-041-0/+19
|
* windows: Provide a sched_yield() implementationMartin Willi2014-06-042-2/+0
|
* library: Change init/deinit order to allow utils to depend on threadingMartin Willi2014-06-041-0/+3
|
* unit-tests: Don't test Unix socket stream/services on WindowsMartin Willi2014-06-041-1/+2
|
* unit-tests: Use send/recv on socket in watcher testsMartin Willi2014-06-041-4/+4
| | | | Windows does not support read/write on sockets.
* unit-tests: Use Windows path for chunk tests, and socket functions if requiredMartin Willi2014-06-041-2/+10
|
* unit-tests: Don't depend on sockaddr_un to test invalid host_t familyMartin Willi2014-06-041-2/+2
|
* unit-tests: Add support for Windows buildMartin Willi2014-06-042-27/+198
| | | | | Instead of signals we catch Windows exceptions. Currently not supported are timers, which is more a convenience thing anyway.
* unit-tests: Sync threads with main thread in test_cleanup_cancel()Tobias Brunner2014-05-191-0/+5
| | | | | Without synchronization threads could get canceled before they could disable their cancelability.
* unit-tests: Allow some HTTP write operations to failTobias Brunner2014-05-191-7/+12
| | | | | | Because CURLOPT_FAILONERROR is enabled in the curl plugin an error code will often (not always) cause the client to close the TCP connection before the server has written the complete response.
* unit-tests: Add a test case for HTTP response codesTobias Brunner2014-05-191-8/+57
|
* unit-tests: Defer failures by worker threadsTobias Brunner2014-05-192-5/+36
| | | | | | | | | | | In some cases the main thread is not ready to immediately call siglongjmp(), e.g. if it currently holds a mutex that is later required during shutdown. Therefore, we delay handling errors in worker threads until the main thread performs the next check itself (or the test function ends). The same issue remains with SIGALRM.
* unit-tests: Make sure plugins in the builddir are loadedTobias Brunner2014-05-191-1/+1
| | | | | | When running the tests in GDB the working directory apparently is different. With the relative path used previously the plugins would not be found and those installed on the system would get used.
* unit-tests: Don't assert failures for unreadable settings files as rootTobias Brunner2014-05-161-5/+8
| | | | The file can still be read by root even if nobody has read privileges.