Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | utils: Add some initial build time assertion macros | Martin Willi | 2014-08-25 | 1 | -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 initialization | Martin Willi | 2014-08-25 | 3 | -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 1071 | Tobias Brunner | 2014-07-22 | 3 | -0/+105 | |
| | ||||||
* | settings: Allow spaces in time settings before the optional unit | Martin Willi | 2014-07-07 | 2 | -2/+7 | |
| | ||||||
* | settings: Be more strict in converting settings to specific data types | Martin Willi | 2014-07-07 | 2 | -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 them | Martin Willi | 2014-07-07 | 1 | -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_pathc | Martin Willi | 2014-07-07 | 1 | -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 argument | Tobias Brunner | 2014-07-02 | 1 | -1/+1 | |
| | ||||||
* | optionsfrom: Properly handle errors when determining file size | Tobias Brunner | 2014-07-02 | 1 | -2/+7 | |
| | ||||||
* | windows: Fix off-by-one error in strerror_s_extended() | Tobias Brunner | 2014-07-02 | 1 | -1/+1 | |
| | ||||||
* | windows: accept() socket handle could theoretically be 0 | Tobias Brunner | 2014-07-02 | 1 | -1/+1 | |
| | ||||||
* | windows: Close correct socket when opening second socket fails in socketpair() | Tobias Brunner | 2014-07-02 | 1 | -1/+1 | |
| | ||||||
* | windows: Make sure the string returned from ReadConsole() is null terminated | Tobias Brunner | 2014-07-02 | 1 | -0/+2 | |
| | ||||||
* | windows: Remove useless assignment in put_thread() | Tobias Brunner | 2014-07-02 | 1 | -1/+1 | |
| | ||||||
* | backtrace: Remove name checks after SymFromAddr() calls | Tobias Brunner | 2014-07-02 | 1 | -9/+5 | |
| | | | | The Name member is an array whose address is always defined. | |||||
* | parser-helper: Ensure file_next() does not remove the sentinel item | Tobias Brunner | 2014-07-01 | 1 | -1/+1 | |
| | ||||||
* | gcrypt: Use predefined pthread locking functions instead of custom hooks | Martin Willi | 2014-07-01 | 1 | -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 arguments | Tobias Brunner | 2014-06-30 | 1 | -0/+26 | |
| | ||||||
* | windows: Fix parameter name in Doxygen comment | Tobias Brunner | 2014-06-30 | 1 | -1/+1 | |
| | ||||||
* | enum: Replace รพ with p in Doxygen comments | Tobias Brunner | 2014-06-30 | 1 | -2/+2 | |
| | ||||||
* | 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 | |
| |