Tobias Brunner
75ff252324
integrity-checker: Fix checksum calculation after randomizing chunk_hash()
2013-06-27 15:34:08 +02:00
Tobias Brunner
fcc33c0cd4
unit-tests: Print loaded plugins
2013-06-27 11:27:13 +02:00
Tobias Brunner
a6357a62b4
unit-tests: RSA key generation might take longer than 4 seconds
...
Check uses a default timeout of 4 seconds for each test case, generating
keys of 6 different key sizes might take longer than that.
2013-06-27 11:06:47 +02:00
Tobias Brunner
65d23c7c90
tests: Properly load plugins from build directory
...
Calling load() incrementally does not really work as dependencies
wouldn't be resolved properly if a required feature was to be provided
by a plugin that is loaded later with a separate call to load().
2013-06-27 11:06:47 +02:00
Tobias Brunner
f2086e42ff
plugin-loader: Method added to provide additional search paths for plugins
2013-06-27 10:27:24 +02:00
Tobias Brunner
ac2ffde4ae
capabilities: Return effective UID/GID if user did not configure anything
2013-06-25 17:16:33 +02:00
Tobias Brunner
5e80e387bd
capabilities: Report effective UID/GID after dropping capabilities
2013-06-25 17:16:33 +02:00
Tobias Brunner
1937538440
capabilities: Handle CAP_CHOWN specially as it might not be required
2013-06-25 17:16:33 +02:00
Tobias Brunner
9c354c659f
capabilities: Check effective UID as fallback if capabilities are not supported
2013-06-25 17:16:33 +02:00
Tobias Brunner
6f15f5e632
dhcp: Require CAP_NET_BIND_SERVICE and CAP_NET_RAW to open/bind sockets
2013-06-25 17:16:32 +02:00
Tobias Brunner
1dd61bf13d
socket-default: Require CAP_NET_BIND_SERVICE for ports < 1024
...
Since we don't know which ports are used with socket-dynamic we can't
demand the capability there, but it might still be required.
2013-06-25 17:16:32 +02:00
Tobias Brunner
41b8546ac0
capabilities: Only plugins that require CAP_NET_ADMIN demand it
...
The daemon as such does not require this capability.
2013-06-25 17:16:32 +02:00
Tobias Brunner
a2eb581781
capabilities: Move global capabilities_t instance to libstrongswan
2013-06-25 17:16:32 +02:00
Tobias Brunner
2e21bac19a
capabilities: Ensure required capabilities are actually held by the process/user
2013-06-25 17:16:32 +02:00
Tobias Brunner
66aaabf342
tun-device: Packets sent over utun devices on Mac OS X have the protocol family prepended
2013-06-21 17:03:21 +02:00
Tobias Brunner
c8a56512a6
tun-device: Avoid opening /dev/tunX multiple times (e.g. on FreeBSD)
2013-06-21 17:03:21 +02:00
Tobias Brunner
0d2ad63fe2
printf-hook: Avoid double-free when freeing Vstr config
...
Thread-specific objects get freed when the thread value object is
destroyed (wasn't the case earlier, i.e. before 2b19dd35 ), which
may cause the second call to vstr_free_conf() to fail in an assert
in Vstr (depending on how it was built).
2013-06-21 17:03:20 +02:00
Tobias Brunner
0d25c4ef87
plugin-loader: Move logging of failed features to status()
...
Still log an error message if critical features fail, as loaded
plugins/features are not logged in that case.
This way loaded plugins are printed before failed features and
the relation is easier to make for users. It also allows programs
to log this message on a different level.
2013-06-21 15:22:46 +02:00
Tobias Brunner
607f8e9906
plugin-loader: Add method to print loaded plugins on a given log level
2013-06-21 15:17:53 +02:00
Tobias Brunner
34ee14dd28
plugin-loader: Collect statistics while loading features, print them in case features failed to load
...
There is no need to explicitly search for failed features in critical
plugins as this is now detected while loading the features.
2013-06-21 15:13:25 +02:00
Tobias Brunner
681e53c70c
plugin-loader: Use different log level if failed feature is in critical plugin
2013-06-21 15:13:25 +02:00
Tobias Brunner
13d2d8f634
plugin-loader: Log message when failing to load plugin
2013-06-21 15:13:25 +02:00
Tobias Brunner
51b9d7513d
plugin-loader: Reduce verbosity while loading plugins
2013-06-21 15:13:25 +02:00
Martin Willi
092550b03a
leak-detective: (re-)whitelist some OpenSSL functions
...
Some static allocations in plugins won't get freed, because in the test case
process the plugins are not destroyed. If a plugin would clean up allocations
done while just using the plugin, these show up as leak in the child process,
letting tests fail.
2013-06-21 10:53:23 +02:00
Martin Willi
ef687db734
unit-tests: load plugins in test-runner from build directory
2013-06-21 10:53:23 +02:00
Martin Willi
b950fc48da
unit-tests: link test-runner against -lpthread
2013-06-21 10:53:23 +02:00
Martin Willi
df1a1a0901
unit-tests: add RSA test cases, very similar to ECDSA
2013-06-21 10:53:23 +02:00
Martin Willi
eabf4af0f8
unit-tests: test with /dev/urandom if random plugin is in use
2013-06-21 10:53:22 +02:00
Martin Willi
d0c09c84a5
unit-tests: test supported ECDSA schemes only
2013-06-21 10:53:22 +02:00
Martin Willi
2bedb0f270
Move test-runners has_feature() function to plugin loader
2013-06-21 10:53:22 +02:00
Martin Willi
df76881f11
unit-tests: enforce CET/CEST timezone to properly test non-UTC time formatting
2013-06-21 10:53:22 +02:00
Martin Willi
44886a0667
unit-tests: don't use ck_assert() to test a cleared chunk, as it allocates data
...
The new allocation might be in the freed area, affecting the test result.
2013-06-21 10:53:22 +02:00
Martin Willi
52bff13848
unit-tests: define 64-bit constats with ULL, fixing compiler warning on 32-bit
2013-06-21 10:53:22 +02:00
Martin Willi
a88cab095d
unit-tests: test some zeroed ECDSA signatures that never should succeed
2013-06-21 10:53:21 +02:00
Martin Willi
7e23f53242
unit-tests: perform signing/validation with keys ECDSA keys generated or loaded
2013-06-21 10:53:21 +02:00
Martin Willi
eabb0befdc
unit-tests: add an ECDSA test case loading keys
2013-06-21 10:53:21 +02:00
Martin Willi
d18ff88faf
unit-tests: perform a first ECDSA test case if ECDSA is supported
2013-06-21 10:53:21 +02:00
Martin Willi
200f38ad4c
unit-tests: add a helper function checking if a plugin feature is available
2013-06-21 10:53:21 +02:00
Martin Willi
cb1745f7a6
unit-tests: add a test case checking if all test vectors have been passed
2013-06-21 10:53:20 +02:00
Martin Willi
e9e4759733
crypto-factory: count the number of test vector failures during registration
2013-06-21 10:53:20 +02:00
Martin Willi
3714979427
unit-tests: load all libstrongswan plugins in test-runner
2013-06-21 10:53:20 +02:00
Tobias Brunner
c0d0391a51
pubkey: Improve comparison of raw public key certificate objects
2013-06-21 10:02:25 +02:00
Martin Willi
ad58246f53
backtrace: use backtrace_symbols() only if we have backtrace() and dladdr() fails
2013-06-19 16:09:31 +02:00
Tobias Brunner
4d04e2c63b
utils: Remove volatile qualifier from refcount_t typedef
...
It's not really required anymore (if it ever was) and may cause compiler
warnings when using the non atomic versions of ref_get/ref_put.
2013-06-19 09:28:30 +02:00
Martin Willi
3160b92adb
utils: ref_get() returns the new value of the reference counter
...
This allows us to use ref_get() for getting unique values.
2013-06-11 15:54:27 +02:00
Martin Willi
fe20f752f1
curl: add an option to fetch bound to a local source address
2013-06-11 15:54:26 +02:00
Martin Willi
0adfffb6dd
fetcher: add missing "continue" when handling FETCH_CALLBACK
2013-06-11 15:54:25 +02:00
Tobias Brunner
f5f7053bcd
leak-detective: Resolve hooked functions during initialization
...
If uses of dlopen(), e.g. when loading plugins, produce errors an error
string could get allocated dynamically. At this point realloc() might not
yet be resolved and when dlsym() is later called by leak detective to do
so the error string might get freed while leak detective is disabled and
real_free() will be called with a pointer into one of leak detective's
memory blocks instead of a pointer to the block itself, causing a SIGSEGV.
2013-06-11 15:48:26 +02:00
Tobias Brunner
49d7a98f47
Refactored plugin-loader with improved dependency resolution
...
With the new implementation the plugins don't have to be listed in any
special order, dependencies are properly resolved. The order only
matters if two plugins provide the same feature.
2013-06-11 11:18:19 +02:00
Tobias Brunner
da04914933
test-vectors: Use plugin features
2013-06-11 11:18:18 +02:00