aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Fixed some typosTobias Brunner2014-06-301-1/+1
|
* windows: Include <sys/stat.h> explicitly before overloading memset()/memcpy()Martin Willi2014-06-251-0/+1
| | | | | | fstat() in newer MinGWs is defined as non-static inline. With our new static inline memset()/memcpy() overloads, this raises a warning. To avoid it, explicitly include <sys/stat.h> once before defining these overloads.
* android: Define HAVE_DLADDR as plugin loader checks for itTobias Brunner2014-06-241-2/+0
|
* android: Update Android.mk files to match changes due to the Windows portTobias Brunner2014-06-241-6/+16
| | | | Makes them easier to compare to the original Makefile.am.
* charon: Set CLOEXEC flag on daemon PID file and /dev/(u)random source FDsMartin Willi2014-06-241-0/+5
| | | | | | | | | | | | | On Fedora, SELinux complains about these open file descriptors when the updown script invokes iptables. While it seems difficult to set the flag on all file descriptors, this at least fixes those covered by the SELinux policy. As these two cases are in code executed while the daemon is still single threaded, we avoid the use of atomic but not fully portable fdopen("e") or open(O_CLOEXEC) calls. Fixes #519.
* utils: Add wrappers for memcpy(3), memmove(3) and memset(3)Tobias Brunner2014-06-241-1/+33
| | | | | | | | These wrappers guarantee that calls to these functions are noops if the number of bytes is 0, as calling them with NULL pointers is undefined according to the C standard, even if the number of bytes is 0 (most implementations probably ignore the pointers anyway in this case, but lets make sure).
* unit-tests: Add tests for DH factoryTobias Brunner2014-06-201-0/+157
|
* crypto-factory: Only sort RNGs by algorithm identifierTobias Brunner2014-06-201-5/+13
| | | | | Others remain in the order in which they were added, grouped by algorithm identifier and sorted by benchmarking speed, if provided.
* unit-tests: Add test for crypto_factory_t's rng_create methodTobias Brunner2014-06-203-0/+157
|
* ipsec: Add a fourth priority class for bypass policiesTobias Brunner2014-06-191-1/+3
|
* unit-tests: Make fixture functions optionalTobias Brunner2014-06-191-2/+8
|
* collections: Add interface for read-only dictionariesTobias Brunner2014-06-192-1/+56
|
* hashtable: Add destroy_function methodTobias Brunner2014-06-192-11/+37
|
* winhttp: Fix a typo to properly release connection handleMartin Willi2014-06-191-1/+1
| | | | Fixes a rather large memory leak in HTTP fetches.
* identification: Only use either , or / to separate RDNsTobias Brunner2014-06-182-7/+17
| | | | | If a DN starts with a slash (or whitespace and a slash) slashes will be used, otherwise commas.
* sshkey: Fix loading of ECDSA keys from filesTobias Brunner2014-06-182-3/+3
|
* sshkey: Add support to parse SSH public keys from files with left|rightsigkeyTobias Brunner2014-06-183-3/+59
|
* windows: Declare strerror_s()Martin Willi2014-06-171-0/+5
| | | | | Older MinGW versions seem to miss this function declaration. Fixes build on Travis using Ubuntu 12.04.
* windows: Extend strerror_r/s by extended POSIX errno stringsMartin Willi2014-06-172-0/+66
|
* windows: Implement strerror_r using strerror_sMartin Willi2014-06-171-0/+9
|
* windows: Wrap most Winsock2 Posix functions to set errnoMartin Willi2014-06-172-65/+198
| | | | | | While Winsock provides many Posix compatibility functions, they do not set errno, but use WSAGetLastError() for error reporting. The wrapped functions derive an errno from WSAGetLastError() on failure.
* watcher: Prevent race condition spawning multiple watcher threadsMartin Willi2014-06-171-1/+3
| | | | | | | | If file descriptors get added and removed in rapid succession, the active watcher thread might not take notice of it and continues running. However, add() spawns a watcher thread whenever a file descriptor is added to an empty set. This could result in multiple watcher threads, which is fixed by a proper check for running watchers.
* thread-value: Defer cleanup handling to thread termination on WindowsMartin Willi2014-06-173-40/+51
| | | | | | | | | | | Instead of cleaning up all thread-values during destruction, cleanup handler is invoked when a thread detaches. Thread detaching is cough using the Windows DllMain() entry point, and allows us to basically revert 204098a7. Using this mechanism, we make sure that the cleanup handler is invoked by the the correct thread. Further, this mechanism works for externally-spawned threads which run outside of our thread_cb() routine, and works more efficiently with short-running threads.
* windows: Link against psapi32Martin Willi2014-06-061-1/+1
| | | | | On some version GetModuleFileNameEx/GetModuleInformation is in psapi32 instead of kernel32. We link to both libraries to make sure we have it.
* backtrace: Use GetModuleInformation/GetModuleFileNameEx directly on Win32Martin Willi2014-06-061-2/+10
| | | | The K32 variants are actually needed on 64-bit only.
* windows: Use WINAPI call convention for Windows API callbacksMartin Willi2014-06-064-7/+9
| | | | | 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.
* winhttp: Support basic authentication for URLs having credentialsMartin Willi2014-06-041-3/+23
|
* winhttp: Support new response code fetcher optionMartin Willi2014-06-041-0/+34
|
* winhttp: Implement a http(s) fetcher based on Microsofts WinHTTP APIMartin Willi2014-06-046-0/+529
|
* child-sa: Pass the number of total policies tied to an SA to the kernelMartin Willi2014-06-041-0/+2
| | | | | This will be useful if the kernel backend has to know how many policies follow an SA install, for example if it must install all policies concurrently.
* windows: Provide POSIX supplement errno values missing in MinGWMartin Willi2014-06-042-23/+147
| | | | | MinGW headers do not define these values, but Windows system headers do. Windows defines them for POSIX compatibility, we do the same locally.
* windows: Provide shutdown(2) operation aliases mapping to those on WindowsMartin Willi2014-06-041-0/+7
|
* x509: Check return value when signing attribute certificatesMartin Willi2014-06-041-9/+16
| | | | | | In addition that this lets AC generation fail properly if private key signing fails, it also fixes an issue when compiling on Windows with MinGW 4.8.1, where for some reason the attributeCertificateInfo got encoded incorrectly.
* unit-tests: Support testable functions on Windows, avoid weak GCC symbolsMartin Willi2014-06-043-61/+61
| | | | | | | 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-044-9/+14
| | | | | | | 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.