Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Fixed some typos | Tobias Brunner | 2014-06-30 | 1 | -1/+1 | |
| | ||||||
* | windows: Include <sys/stat.h> explicitly before overloading memset()/memcpy() | Martin Willi | 2014-06-25 | 1 | -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 it | Tobias Brunner | 2014-06-24 | 1 | -2/+0 | |
| | ||||||
* | android: Update Android.mk files to match changes due to the Windows port | Tobias Brunner | 2014-06-24 | 1 | -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 FDs | Martin Willi | 2014-06-24 | 1 | -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 Brunner | 2014-06-24 | 1 | -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 factory | Tobias Brunner | 2014-06-20 | 1 | -0/+157 | |
| | ||||||
* | crypto-factory: Only sort RNGs by algorithm identifier | Tobias Brunner | 2014-06-20 | 1 | -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 method | Tobias Brunner | 2014-06-20 | 3 | -0/+157 | |
| | ||||||
* | ipsec: Add a fourth priority class for bypass policies | Tobias Brunner | 2014-06-19 | 1 | -1/+3 | |
| | ||||||
* | unit-tests: Make fixture functions optional | Tobias Brunner | 2014-06-19 | 1 | -2/+8 | |
| | ||||||
* | collections: Add interface for read-only dictionaries | Tobias Brunner | 2014-06-19 | 2 | -1/+56 | |
| | ||||||
* | hashtable: Add destroy_function method | Tobias Brunner | 2014-06-19 | 2 | -11/+37 | |
| | ||||||
* | winhttp: Fix a typo to properly release connection handle | Martin Willi | 2014-06-19 | 1 | -1/+1 | |
| | | | | Fixes a rather large memory leak in HTTP fetches. | |||||
* | identification: Only use either , or / to separate RDNs | Tobias Brunner | 2014-06-18 | 2 | -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 files | Tobias Brunner | 2014-06-18 | 2 | -3/+3 | |
| | ||||||
* | sshkey: Add support to parse SSH public keys from files with left|rightsigkey | Tobias Brunner | 2014-06-18 | 3 | -3/+59 | |
| | ||||||
* | windows: Declare strerror_s() | Martin Willi | 2014-06-17 | 1 | -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 strings | Martin Willi | 2014-06-17 | 2 | -0/+66 | |
| | ||||||
* | windows: Implement strerror_r using strerror_s | Martin Willi | 2014-06-17 | 1 | -0/+9 | |
| | ||||||
* | windows: Wrap most Winsock2 Posix functions to set errno | Martin Willi | 2014-06-17 | 2 | -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 threads | Martin Willi | 2014-06-17 | 1 | -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 Windows | Martin Willi | 2014-06-17 | 3 | -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 psapi32 | Martin Willi | 2014-06-06 | 1 | -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 Win32 | Martin Willi | 2014-06-06 | 1 | -2/+10 | |
| | | | | The K32 variants are actually needed on 64-bit only. | |||||
* | windows: Use WINAPI call convention for Windows API callbacks | Martin Willi | 2014-06-06 | 4 | -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 fetch | Martin Willi | 2014-06-04 | 1 | -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 credentials | Martin Willi | 2014-06-04 | 1 | -3/+23 | |
| | ||||||
* | winhttp: Support new response code fetcher option | Martin Willi | 2014-06-04 | 1 | -0/+34 | |
| | ||||||
* | winhttp: Implement a http(s) fetcher based on Microsofts WinHTTP API | Martin Willi | 2014-06-04 | 6 | -0/+529 | |
| | ||||||
* | child-sa: Pass the number of total policies tied to an SA to the kernel | Martin Willi | 2014-06-04 | 1 | -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 MinGW | Martin Willi | 2014-06-04 | 2 | -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 Windows | Martin Willi | 2014-06-04 | 1 | -0/+7 | |
| | ||||||
* | x509: Check return value when signing attribute certificates | Martin Willi | 2014-06-04 | 1 | -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 symbols | Martin Willi | 2014-06-04 | 3 | -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 hashtables | Martin Willi | 2014-06-04 | 4 | -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. | |||||
* | openssl: Don't re-enter FIPS mode if we are already using it | Martin Willi | 2014-06-04 | 1 | -2/+3 | |
| | | | | | | If FIPS mode has been enabled by other means, under some environments it can't be entered again. It fails with "FIPS mode already set". To avoid it, we first check the mode before changing it. | |||||
* | unit-tests: Force a CET/CEST timezone Windows understands | Martin Willi | 2014-06-04 | 1 | -0/+4 | |
| | | | | | | As it is currently unclear what the "three-letter-timezone" for CEST is, we use the German timezone, which actually is CET/CEST. SetEnvironmentVariable() "TZ" does not seem to affect localtime(), so we use _putenv() instead. | |||||
* | utils: Add a wait_sigint() function to wait for SIGINT or equivalent | Martin Willi | 2014-06-04 | 2 | -0/+88 | |
| | ||||||
* | chunk: On Windows, use binary mode in chunk_write() | Martin Willi | 2014-06-04 | 1 | -1/+8 | |
| | ||||||
* | openssl: Be less verbose about FIPS mode when not running as daemon | Martin Willi | 2014-06-04 | 1 | -2/+2 | |
| | | | | | While this is valuable information, printing it for pki and other tools is annoying. | |||||
* | unit-tests: Adapt settings tests for Windows | Martin Willi | 2014-06-04 | 1 | -2/+13 | |
| | ||||||
* | parser-helper: Detect absolute pathnames and concatenate paths on Windows | Martin Willi | 2014-06-04 | 1 | -2/+3 | |
| | ||||||
* | utils: Provide a path_absolute() function to check path for non-relativeness | Martin Willi | 2014-06-04 | 3 | -38/+88 | |
| | | | | The usually used trivial '/' check won't work on Windows platforms. | |||||
* | utils: Return plain drive letter as base/pathname for drive letters on Windows | Martin Willi | 2014-06-04 | 1 | -0/+9 | |
| | ||||||
* | utils: Support Windows path separators in path_basename/dirname | Martin Willi | 2014-06-04 | 2 | -9/+28 | |
| | ||||||
* | utils: Define a platform directory separator character used in paths | Martin Willi | 2014-06-04 | 1 | -0/+9 | |
| | ||||||
* | windows: Provide a getpass() implementation | Martin Willi | 2014-06-04 | 2 | -0/+65 | |
| | ||||||
* | chunk: On Windows, chunk_map() opens files in binary mode | Martin Willi | 2014-06-04 | 1 | -2/+7 | |
| | ||||||
* | windows: Include for Vista instead of defining CondVar/SRWLock functions ourself | Martin Willi | 2014-06-04 | 5 | -33/+12 | |
| |