aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
Commit message (Collapse)AuthorAgeFilesLines
* packet: Define a global default maximum size for IKE packetsTobias Brunner2014-10-101-0/+5
|
* process: Add a wrapper to invoke a command under the system default shellMartin Willi2014-10-063-0/+110
|
* process: Port child process spawning to the Windows platformMartin Willi2014-10-062-1/+315
|
* process: Provide an abstraction to spawn child processes with redirected I/OMartin Willi2014-10-067-3/+490
|
* library: Allow specifying the path to strongswan.conf in the STRONGSWAN_CONF ↵Shea Levy2014-10-021-1/+1
| | | | env var
* curl: For SSL features, depend on thread-safety provided by our crypto pluginsMartin Willi2014-09-243-7/+57
| | | | | | | | | To use SSL in curl, we need to initialize the SSL library in a thread-safe manner and provide the appropriate callbacks. As we already do that in our crypto plugins using these libraries, we depend on these features. This implies that we need the same plugin enabled (openssl, gcrypt) as the curl backend is configured to use to fetch from HTTPS URIs.
* curl: Dynamically query supported protocols and register appropriate featuresMartin Willi2014-09-241-10/+64
|
* leak-detective: Whitelist libssl SSL_COMP_get_compression_methods()Martin Willi2014-09-241-0/+2
| | | | | This function is called by libcurl initialization with SSL, and uses a static allocation of compression algorithms not freed.
* curl: Try to initialize with SSL support to handle https:// URIsMartin Willi2014-09-241-1/+6
| | | | If initialization fails, we fall back to the old behavior.
* watcher: Add a method to query the watcher stateMartin Willi2014-09-242-7/+45
| | | | | This allows a user to check if the watcher is actually running, and potentially perform read operations directly instead of relying on watcher.
* plugin-loader: Support a reload() callback for static featuresMartin Willi2014-09-222-4/+35
|
* settings: Make loading a NULL or empty pattern a (nop-)successMartin Willi2014-09-221-1/+1
|
* settings: Use strongswan.conf used during library initialization for reloadMartin Willi2014-09-221-3/+1
| | | | | | | | Since 4b670a20 we require an explicit strongswan.conf to re-load configurations. However, the define was missing in the build, breaking SIGHUP based config reloading. Fixes #651.
* library: Store the used root strongswan.conf configurationMartin Willi2014-09-222-7/+12
|
* chunk: Fix Doxygen comments for chunk_internet_checksum[_inc]Tobias Brunner2014-09-111-2/+2
|
* auth-cfg: Fix crash after several reauthentications with multiple ↵Tobias Brunner2014-09-111-1/+1
| | | | | | | | | | authentication rounds Due to the issue described in c641974, purge() inadvertently destroyed CA certificates that should have been kept (while the pointer to these objects remained in the array). This lead to incorrect reference counts and after a few reauthentications with multiple authentication rounds, which cause calls to purge(TRUE), to crashes.
* array: Adjust negative index before calling remove_head|tail()Tobias Brunner2014-09-111-4/+4
| | | | For ARRAY_TAIL we most often want to call remove_tail() not remove_head().
* array: Warn about caveat with array_remove_at() and value based arraysTobias Brunner2014-09-111-0/+5
| | | | | | | | | | | | | | | | Because enumerate() for value based arrays returns a pointer directly to the internal array elements and because array_remove_at() or rather the called array_remove() may move elements over the element at the currently enumerated position, the pointer passed to enumerate() will point to a different array element after the array_remove_at() call. The caller will thus operate on the wrong element if that pointer is accessed again before calling enumerate(). For performance reasons we currently don't change the implementation to copy each array element during enumeration to a private member of the enumerator and return a pointer to that. Similarly, due to the danger of subtle bugs we don't remember the pointer passed to enumerate() to later redirect it to a copy created during the array_remove_at() call.
* asn1: Try to fill the available binary OID buffer if possibleTobias Brunner2014-09-091-11/+24
|
* unit-tests: Give worker threads time to clean up when testing thread_t.detach()Tobias Brunner2014-09-091-2/+4
|
* stream-service: Prevent race conditions due to blocking call to destroy()Tobias Brunner2014-09-091-5/+62
| | | | | | | | In the previous implementation queued jobs could prevent a service from getting destroyed. This could have lead to a deadlock when the processor is cancelled. Now destroy() still blocks, but waits only for actually running tasks. The service instance is reference counted so that queued jobs can safely be destroyed.
* stream-service: Do not accept or re-register when service is terminatedTobias Brunner2014-09-091-2/+10
|
* stream-service: Restart accepting without blockingTobias Brunner2014-09-091-2/+7
| | | | | | | | | | | | Calling on_accept() sometimes lead to deadlocks when service->destroy() was called concurrently. That is, two threads waiting in on_accept() but the last worker would only wake one due to the call to signal(). Calling broadcast() wouldn't help either as that could lead to crashes if the thread that called destroy() is woken first. This is also more efficient as a constant pool of concurrent workers can be maintained, otherwise peaks at the limit were followed by only a single worker being active.
* asn1: Make sure not to exceed buffer for binary OIDTobias Brunner2014-09-091-1/+1
|
* mutex: Use atomics to set current thread in recursive mutexTobias Brunner2014-09-091-9/+12
| | | | | | | | Because this->thread is also read by threads that don't hold the mutex the previous implementation was problematic (especially since pthread_t is an opaque type of unknown length). Fixes #654.
* curl: Log error code tooTobias Brunner2014-09-091-2/+5
| | | | It seems libcurl does not always return an error message.
* 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.
* openssl: Report correct key length for EC keys when not using NIST curvesTobias Brunner2014-09-022-22/+2
| | | | Fixes #688.
* credmgr: Fix copy and paste error in add_validatorThomas Egerer2014-08-291-1/+1
| | | | | | | | | This won't hurt as long as sets and validators are of the same class. But as soon as one of the object's class is changed this will cause either a compile error (best option), or result (most likely) in a crash. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
* utils: Check if the parameter passed to countof() is actually an array typeMartin Willi2014-08-251-1/+2
| | | | This should avoid errors such as the one fixed with 118b2879.
* utils: Add some initial build time assertion macrosMartin Willi2014-08-251-0/+14
| | | | | These are useful to assert constants during build time. We evaluate the expression to 0 when valid, so we can safely use the evaluated value.
* diffie-hellman: Explicitly initialize DH exponent sizes during initializationMartin Willi2014-08-253-8/+38
| | | | | | | | To avoid any race conditions when multiple threads call and initialize diffie_hellman_get_params(), explicitly examine the optimum DH exponent size during library initialization. Fixes #655.
* chunk: Add function to calculate Internet Checksums according to RFC 1071Tobias Brunner2014-07-223-0/+105
|
* settings: Allow spaces in time settings before the optional unitMartin Willi2014-07-072-2/+7
|
* settings: Be more strict in converting settings to specific data typesMartin Willi2014-07-072-25/+30
| | | | | | | 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.
* utils: Undefine mem{cpy,move,set} if set before defining themMartin Willi2014-07-071-0/+9
| | | | | Some platforms, such as OS X, use macros for these functions. Undefine them to avoid compiler warnings.
* enumerator: Enumerate glob(3) matches using gl_pathcMartin Willi2014-07-071-9/+6
| | | | | | | While glob should return a NULL terminated gl_pathv when having no matches, at least on OS X this is not true when using GLOB_DOOFFS. Rely on the number of matches returned in gl_pathc, which seems to be more reliable in error cases.
* winhttp: Do not use countof() on pointer argumentTobias Brunner2014-07-021-1/+1
|
* optionsfrom: Properly handle errors when determining file sizeTobias Brunner2014-07-021-2/+7
|
* windows: Fix off-by-one error in strerror_s_extended()Tobias Brunner2014-07-021-1/+1
|
* windows: accept() socket handle could theoretically be 0Tobias Brunner2014-07-021-1/+1
|
* windows: Close correct socket when opening second socket fails in socketpair()Tobias Brunner2014-07-021-1/+1
|
* windows: Make sure the string returned from ReadConsole() is null terminatedTobias Brunner2014-07-021-0/+2
|
* windows: Remove useless assignment in put_thread()Tobias Brunner2014-07-021-1/+1
|
* backtrace: Remove name checks after SymFromAddr() callsTobias Brunner2014-07-021-9/+5
| | | | The Name member is an array whose address is always defined.
* parser-helper: Ensure file_next() does not remove the sentinel itemTobias Brunner2014-07-011-1/+1
|
* gcrypt: Use predefined pthread locking functions instead of custom hooksMartin Willi2014-07-011-50/+4
| | | | | | | | | | | | | Starting with libgcrypt 1.6, it seems that custom locking functions are not supported anymore. Instead, the user has to select from one of the pre-defined set of locking functions. Given that we have a proper threading abstraction API with optional profiling on all platforms, this is somewhat annoying. However, there does not seem to be a way to use custom functions, and we have no other choice than using the provided macro magic to support all libgcrypt versions. Fixes #630.
* utils: Helper macros to define overloaded macros based on number of argumentsTobias Brunner2014-06-301-0/+26
|
* windows: Fix parameter name in Doxygen commentTobias Brunner2014-06-301-1/+1
|
* enum: Replace þ with p in Doxygen commentsTobias Brunner2014-06-301-2/+2
|