aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a minor vulnerability in which a malformed ASN.1 length field could ↵5.1.2rc1Andreas Steffen2014-02-141-0/+1
| | | | cause a crash of the charon daemon if the verbose debug level 3 (raw hex dump) for the asn subsystem is enabled.
* printf-hook-glibc: printf.h on FreeBSD 10 does not include stdargs.hTobias Brunner2014-02-131-1/+1
|
* array: Fix compilation on FreeBSDTobias Brunner2014-02-131-2/+2
|
* settings: Add support to enumerate sections and key/value pairs with fallbacksTobias Brunner2014-02-123-45/+187
|
* settings: Implement subsections and key/value pairs with sorted arraysTobias Brunner2014-02-121-68/+74
| | | | | | 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.
* array: Add fallback for qsort_r using thread-local valueTobias Brunner2014-02-123-2/+49
| | | | Cygwin for example does not support qsort_r.
* plugin-loader: Optionally use load option in each plugin section to load pluginsTobias Brunner2014-02-122-4/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* array: Add array_bsearch functionTobias Brunner2014-02-123-0/+141
|
* array: Add array_sort functionTobias Brunner2014-02-123-1/+167
|
* lib: All settings use configured namespaceTobias Brunner2014-02-1223-54/+54
|
* lib: Add default config fallback for configured namespaceTobias Brunner2014-02-121-0/+3
| | | | All settings in the configured global namespace fall back to libstrongswan.
* unit-tests: Test how settings_t handles some invalid dataTobias Brunner2014-02-121-0/+72
|
* settings: Add method that allows to define fallback sections for other sectionsTobias Brunner2014-02-123-13/+276
| | | | | The fallbacks are currently only used for single value lookups. Enumerators are not affected by them.
* settings: Make print_key() not rely on null-terminated beginning of key bufferTobias Brunner2014-02-121-10/+5
| | | | | The key to print (e.g. until the next .) still has to be null-terminated.
* unit-tests: Add tests for includes and file loading in settings_tTobias Brunner2014-02-121-0/+149
|
* settings: Allow empty strings in section keyTobias Brunner2014-02-122-23/+33
|
* unit-tests: Add tests for enumerators in settings_tTobias Brunner2014-02-121-0/+148
|
* unit-tests: Add tests for setters in settings_tTobias Brunner2014-02-121-0/+109
|
* unit-tests: Add basic tests for settings_tTobias Brunner2014-02-123-0/+319
|
* lib: Add global config namespaceTobias Brunner2014-02-123-5/+19
|
* asn1: Support dates before 1970-01-01 (i.e. when time_t gets negative)Tobias Brunner2014-02-123-4/+29
| | | | | | On x86 we allow "overflows" around 1969/1970 but not for other dates. Fixes #509.
* asn1: Add additional validation for parsed ASN.1 date/time valuesTobias Brunner2014-02-122-1/+20
|
* identification: Fix printing of empty RDNs on FreeBSDTobias Brunner2014-02-121-1/+6
| | | | On FreeBSD (null) is printed for NULL even if the precision is 0.
* tests: Fix test for printing NULL on FreeBSDTobias Brunner2014-02-121-2/+13
|
* unit-tests: added asn1_parser testsAndreas Steffen2014-02-103-0/+293
|
* unit-tests: added some more ASN.1 length testsAndreas Steffen2014-02-101-0/+13
|
* leak_detective: Assign return value of realloc to bufThomas Egerer2014-02-101-1/+1
| | | | | | | If realloc return a pointer value different from the value to be reallocated, a double free can occur in this context. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
* rdrand: Provide get_features() regardless of RDRAND availabilityMartin Willi2014-02-101-6/+6
| | | | | As having no get_features() raises a deprecated warning, we return no features instead.
* rdrand: Move RDRAND detection log to level 2Martin Willi2014-02-101-2/+2
| | | | | When having RDRAND support, these log messages might be confusing when using pki or other tools.
* unit-tests: Add some test cases for HTTP GET/POST fetchesMartin Willi2014-01-313-1/+275
|
* unit-tests: Fix test_runner_run() apidocMartin Willi2014-01-291-1/+1
|
* pem: Use chunk_map() instead of non-portable mmap()Martin Willi2014-01-231-29/+6
|
* integrity-checker: Use chunk_map() instead of non-portable mmap()Martin Willi2014-01-231-31/+6
|
* chunk: Externalize error reporting in chunk_write()Martin Willi2014-01-233-13/+11
| | | | | This avoids passing that arbitrary label just for error messages, and gives greater flexibility in handling errors.
* chunk: Provide a fallback chunk_map() if mmap is not availableMartin Willi2014-01-231-1/+46
|
* chunk: Use dynamically allocated buffer in chunk_from_fd()Martin Willi2014-01-233-14/+130
| | | | | | | | When acting on files, we can use fstat() to estimate the buffer size. On non-file FDs, we dynamically increase an allocated buffer. Additionally we slightly change the function signature to properly handle zero-length files and add appropriate unit tests.
* chunk: Add functions to map file contents to a chunkMartin Willi2014-01-233-1/+149
|
* curl: Replace spaces in URIs with %20Tobias Brunner2014-01-231-3/+14
| | | | | | | cURL requires the URIs to be URL-encoded. Apparently, some CAs encode CRL URIs with spaces in them. Fixes #454.
* utils: Add strreplace functionTobias Brunner2014-01-233-2/+155
|
* agent: Keep CAP_DAC_OVERRIDE to connect to ssh-agent socketTobias Brunner2014-01-233-2/+10
| | | | This is also required if charon-cmd is used with capability dropping.
* unit-tests: Pass a test suite collection name to print during test executionMartin Willi2014-01-223-8/+11
| | | | | As we except to get more and more test runners for the different components, we add a name to easily identify them on the test output.
* array: Add an array_get() functionMartin Willi2014-01-223-3/+44
|
* watcher: Don't complain if select() syscall got interruptedMartin Willi2014-01-221-1/+1
|
* stream: Make sure no watcher callback is active while changing stream callbacksMartin Willi2014-01-221-14/+3
| | | | | | | | | | | When changing async callbacks on streams, we have to make sure the watcher callback is not currently active and has temporarily disabled callbacks. This could have been the case, as we didn't explicitly removed any pending watcher registration if both callbacks are NULL. By enforcing the watcher unregistration, we are sure the watcher callback is not active and currently is not mangling the callback hooks. This should make sure we avoid any races for the callback variables.
* proposal: Add possibility to register custom proposal keyword parserThomas Egerer2014-01-202-2/+66
| | | | | | | | | If a proposal string cannot be matched to a token using strcmp (e.g. if you want to register a whole class of algorithms containing their ID, like my_alg_2342), you can use the provided function to register a parser that transforms the given string into a proposal token. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
* unit-tests: Add environment variable to reduce the number of generated keysTobias Brunner2014-01-202-2/+14
| | | | | | | If TESTS_REDUCED_KEYLENGTHS is set RSA and ECDSA keys are only generated for the lowest configured key length. Fixes #474.
* unit-tests: Generate RSA key with 768 bits not 786Tobias Brunner2014-01-201-1/+1
|
* printf-hook-builtin: Correctly calculate written bytes in print_in_hook()Martin Willi2014-01-151-3/+7
| | | | | | | | | | The hook data counts remaining buffer bytes, not used ones. Counting them correctly fixes a crash for long hexdumps. Further, print_in_hook() must return the number of bytes that would have been written, not the actually written bytes. This is important, as we allocate a dynamic buffer in bus that relies on the exact byte count. Fixes long hexdumps that got truncated.
* test-asn1: Fix skipping of >2038 tests on i386Tobias Brunner2014-01-061-35/+35
| | | | | | | | The two constants overflow time_t on i386 (they also produced a compiler warning without type suffix) so the comparison with TIME_32_BIT_SIGNED_MAX did not work as intended. Fixes #477.
* chunk: Fix chunk_mac/hash tests on big-endian systemsTobias Brunner2014-01-061-2/+27
| | | | | | | | Our SipHash-2-4 implementation returns the result in host order, while the test vectors are little-endian. Use a custom comparison function to account for this. Fixes #478.