aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* types: Use generic type definitions to separate header fileMartin Willi2015-04-162-62/+88
|
* atomics: Move atomics/recounting support to separate filesMartin Willi2015-04-164-180/+245
|
* enum-names: Fail gracefully when passing a NULL value as enum namesMartin Willi2015-04-151-1/+5
|
* leak-detective: Whitelist gcrypt_plugin_create()Martin Willi2015-04-151-0/+1
| | | | | | gcry_check_version() does not free statically allocated resources. However, we can't whitelist it in some versions, as it is not a resolvable symbol name. Instead, whitelist our own plugin constructor function.
* utils: Provide aligning variants of INIT/INIT_EXTRA macrosMartin Willi2015-04-151-0/+29
|
* utils: Add malloc/free wrappers returning aligned dataMartin Willi2015-04-152-0/+62
| | | | | | | | | | | | | While we could use posix_memalign(3), that is not fully portable. Further, it might be difficult on some platforms to properly catch it in leak-detective, which results in invalid free()s when releasing such memory. We instead use a simple wrapper, which allocates larger data, and saves the padding size in the allocated header. This requires that memory is released using a dedicated function. To reduce the risk of invalid free() when working on corrupted data, we fill up all the padding with the padding length, and verify it during free_align().
* utils: Provide an INIT_EXTRA() macro, that allocates extra data to INIT()Martin Willi2015-04-151-0/+15
|
* utils: Define MAX_(U)INT_TYPE to the maximum size integer type availableMartin Willi2015-04-141-0/+6
|
* utils: Typedef int128_t and u_int128_t types if supportedMartin Willi2015-04-141-0/+11
|
* utils: Add a constant time chunk_equals() variant for cryptographic purposesMartin Willi2015-04-141-0/+13
|
* utils: Add a constant time memeq() variant for cryptographic purposesMartin Willi2015-04-142-0/+24
|
* cpu-feature: Support Via Padlock security featuresMartin Willi2015-04-132-0/+56
|
* cpu-feature: Add a common class to query available CPU featuresMartin Willi2015-04-132-0/+164
| | | | Currently supported is x86/x64 via cpuid() for some common features.
* utils: Fix enum_flags_to_string parameter name to match Doxygen descriptionMartin Willi2015-03-191-1/+1
|
* enum: Extend printf hook to print flagsThomas Egerer2015-03-032-6/+122
| | | | Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
* apple: Redefine some additional clashing Mach typesMartin Willi2014-12-161-0/+6
| | | | | | While they usually are not included in a normal strongSwan build, the XPC header indirectly defines these Mach types. To build charon-xpc, which uses both XPC and strongSwan includes, we have to redefine these types.
* apple: Use precancelable poll() to wrap accept/recvmsg callsMartin Willi2014-12-121-1/+5
| | | | | | To make accept/recvmsg cancelable, we wrap them with poll. As poll itself does not honor pending cancellations when entering the function, we use our variant that checks for pending cancellation requests before entering poll().
* windows: Properly set errno for read/write functions using WinsockMartin Willi2014-11-281-4/+4
|
* windows: Move the compatibility header to the compat subfolderMartin Willi2014-11-213-3/+3
|
* apple: Wrap accept() and recvfrom() with poll(2) instead of selectMartin Willi2014-11-211-5/+11
|
* apple: Introduce a central compatibility header with all __APPLE__ quirksMartin Willi2014-11-212-0/+106
|
* windows: Provide a write(2) wrapper that uses send(2) on socketsMartin Willi2014-11-212-0/+22
|
* windows: Provide a read(2) wrapper that uses recv(2) on socketsMartin Willi2014-11-212-0/+25
|
* windows: Provide a poll(2) wrapper calling WSAPoll()Martin Willi2014-11-213-0/+40
|
* identification: Support custom types in string constructor prefixesMartin Willi2014-10-302-0/+42
|
* identification: Support prefixes in string constructors for an explicit typeMartin Willi2014-10-302-0/+54
|
* chunk: Fix internet checksum calculation on big-endian systemsTobias Brunner2014-10-231-1/+1
| | | | | | | ntohs() might be defined as noop (#define ntohs(x) (x)) so we have to manually shorten the negated value (gets promoted to an int). Fixes #747.
* backtrace: Fix symbol lookup in dynamic symtab via libbfdTobias Brunner2014-10-141-0/+1
|
* process: Include missing <signal.h> for raise(3)Martin Willi2014-10-141-0/+1
| | | | Fixes OS X build.
* 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).