aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils
Commit message (Collapse)AuthorAgeFilesLines
* process: Add a wrapper to invoke a command under the system default shellMartin Willi2014-10-062-0/+94
|
* process: Port child process spawning to the Windows platformMartin Willi2014-10-061-1/+283
|
* process: Provide an abstraction to spawn child processes with redirected I/OMartin Willi2014-10-062-0/+312
|
* 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.
* chunk: Fix Doxygen comments for chunk_internet_checksum[_inc]Tobias Brunner2014-09-111-2/+2
|
* 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.
* chunk: Add function to calculate Internet Checksums according to RFC 1071Tobias Brunner2014-07-222-0/+56
|
* 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.
* 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
|
* 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
|
* utils: Helper macros to define overloaded macros based on number of argumentsTobias Brunner2014-06-301-0/+26
|
* 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.
* 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).
* identification: Only use either , or / to separate RDNsTobias Brunner2014-06-181-3/+13
| | | | | If a DN starts with a slash (or whitespace and a slash) slashes will be used, otherwise commas.
* 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.
* 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-062-3/+3
| | | | | For x86_64 it does not actually matter, but for i686 builds the call convention is different with WINAPI.
* 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
|
* unit-tests: Support testable functions on Windows, avoid weak GCC symbolsMartin Willi2014-06-042-33/+56
| | | | | | | 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-042-1/+10
| | | | | | | 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.
* utils: Add a wait_sigint() function to wait for SIGINT or equivalentMartin Willi2014-06-042-0/+88
|
* chunk: On Windows, use binary mode in chunk_write()Martin Willi2014-06-041-1/+8
|
* parser-helper: Detect absolute pathnames and concatenate paths on WindowsMartin Willi2014-06-041-2/+3
|
* utils: Provide a path_absolute() function to check path for non-relativenessMartin Willi2014-06-042-0/+35
| | | | The usually used trivial '/' check won't work on Windows platforms.
* utils: Return plain drive letter as base/pathname for drive letters on WindowsMartin Willi2014-06-041-0/+9
|
* utils: Support Windows path separators in path_basename/dirnameMartin Willi2014-06-041-9/+9
|
* utils: Define a platform directory separator character used in pathsMartin Willi2014-06-041-0/+9
|
* windows: Provide a getpass() implementationMartin Willi2014-06-042-0/+65
|
* chunk: On Windows, chunk_map() opens files in binary modeMartin Willi2014-06-041-2/+7
|
* windows: Don't redeclare inet_ntop/pton if already definedMartin Willi2014-06-041-0/+4
|
* windows: Check for existence of error codes before defining themMartin Willi2014-06-041-0/+4
|
* windows: Overload sleep() cancellable when it is defined in <unistd.h>Martin Willi2014-06-041-1/+3
|
* windows: Provide a close(2) that can close both file handles and socketsMartin Willi2014-06-042-0/+22
|
* chunk: Fallback to recv() on Windows chunk_from_fd() when operating on socketMartin Willi2014-06-041-0/+6
|
* windows: Don't use function macros to overload send/recv() and friendsMartin Willi2014-06-041-4/+4
| | | | | While the macro versions would not catch non-function invocations, we actually have to use catch all to support the sender_t.send() function.
* windows: Provide a strndup(3) replacementMartin Willi2014-06-042-0/+20
|
* unit-tests: Uninline dlopen() and friends, make more dynamic, fix dlerror()Martin Willi2014-06-042-58/+136
| | | | | As the error string contains a newline, we have to remove that before returning the string.
* windows: Provide a cancellable usleep(), but with ms resolution onlyMartin Willi2014-06-042-0/+18
|