| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
| |
We still try to calculate these directly as it can avoid a dependency on
the pkcs1 or other plugins. But for e.g. PGPv3 keys we need to delegate the
actual fingerprint calculation to the pgp plugin.
|
| |
|
|
|
|
|
|
|
|
| |
The Blowfish and Twofish implementations provided by the gcrypt plugin
only support specific key lengths, which we don't know when testing
against vectors (either during unit tests or during algorithm
registration). The on_create test with a specific key length will be
skipped anyway, so there is no point in treating this failure differently.
|
|
|
|
|
| |
The TESTS_VERBOSITY option takes an integer from -1 to 4 that sets the
default debug level.
|
|
|
|
|
| |
The TESTS_SUITES environment variable can contain a comma separated list
of names of test suites to run.
|
|
|
|
|
|
|
|
| |
Previously, the {ns}.crypto_test.on_add option had to be enabled to
actually test the algorithms, which we can't enforce for the tests in
the test_runner as the option is already read when the crypto factory
is initialized. Even so, we wouldn't want to do this for every unit
test, which would be the result of enabling that option.
|
| |
|
|
|
|
|
| |
This makes the tests work with clang, which does not implement said
builtin.
|
| |
|
|
|
|
| |
This avoids any clashes with existing functions in the monolithic build.
|
|
|
|
|
|
|
|
| |
Because GCC does not adhere to the priorities defined for constructors
when building with --enable-monolithic (not sure if it was just luck
that it worked in non-monolithic mode - anyway, it's not very portable)
function registration would fail because the hashtable would not be
created yet.
|
| |
|
|
|
|
|
|
|
|
| |
Clang does not initialize padding in union members so hashing the
complete "arg" union could lead to different hashes if the hashed
plugin_feature_t does not have static storage duration.
Fixes #549.
|
|
|
|
|
|
|
| |
Memory beyond the end of the array was moved when array elements in the
second half of an array were removed.
Fixes #548.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #539.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A valgrind analysis of libstrongswan revealed an invalid read of 1 in
the function starts_with(). A more thorough analysis proved this to be
true and showed that with a specially crafted config file (e.g. a single
'#'-character not followed by a newline), the parser might even
interpret the random memory contents following the allocated buffer as
part of the configuration file.
The way the parser is designed, it must be able to skip an inserted
'\0' and continue parsing. Since it is not able to skip two '\0'
characters, the 'fix' of allocating two more bytes than the size of the
parsed file and setting them to '\0' seems to be a safe bet.
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
constructors and built some unit tests for the latter)
|
| |
|
| |
|
|
|
|
| |
For instance, on Mac OS X memrchr(3) is not provided by the C library.
|
| |
|
| |
|
|
|
|
|
| |
For some utils _GNU_SOURCE might be needed but that conflicts with the
signature of strerror_r(3).
|
|
|
|
|
|
|
|
| |
dirname(3) may return a pointer to a statically allocated buffer.
So freeing the returned value can result to undefined behavior. This was
noticed on FreeBSD where it caused very strange crashes.
It is also not thread-safe, which will be addressed later.
|
| |
|
|
|
|
| |
References #516.
|
|
|
|
| |
Fixes #516.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
While it really would be desirable to allow stream destruction during on_read()
callbacks, this does not work anymore since e49b2998. Until we have a proper
solution for this issue, use asynchronous disconnects for the only user doing
so.
Fixes #518.
|
|
|
|
| |
cause a crash of the charon daemon if the verbose debug level 3 (raw hex dump) for the asn subsystem is enabled.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Is a bit more memory efficient (also due to lazy instantiation) and
lookups for sections with lots of subsections/keys (e.g. charon.plugins) are
faster.
|
|
|
|
| |
Cygwin for example does not support qsort_r.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This now works because all plugins use the same config namespace.
If <ns>.load_modular is true, the list of plugins to load is determined
via the value of the <ns>.plugins.<name>.load options.
Using includes the following is possible:
charon {
load_modular = yes
plugins {
include strongswan.d/charon/*.conf
}
}
charon-cmd {
load_modular = yes
plugins {
include strongswan.d/charon-cmd/*.conf
}
}
Where each .conf file would contain something like:
<name> {
load = yes
<option> = <value>
}
To increase the priority of individual plugins load = <priority> can be
used (the default is 1). For instance, to use openssl instead of the
built-in crypto plugins set in strongswan.d/charon/openssl.conf:
openssl {
load = 10
}
If two plugins have the same priority their order in the default plugin
list is preserved. Plugins not found in that list are ordered
alphabetically before other plugins with the same priority.
|