aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils
Commit message (Collapse)AuthorAgeFilesLines
* certificate: Return signature scheme and parameters from issued_by() methodTobias Brunner2017-11-081-2/+2
| | | | | This also required some include restructuring (avoid including library.h in headers) to avoid unresolvable circular dependencies.
* utils: Add helper function to parse time spans from stringsTobias Brunner2017-11-022-8/+76
|
* asn1: Add additional OIDs seen in certificate DNsTobias Brunner2017-11-021-0/+3
|
* utils: Include stdint.hTobias Brunner2017-09-191-0/+1
| | | | | | | | | Recent releases of glibc don't include the full stdint.h header in some network headers included by utils.h. So uintptr_t might not be defined. Since we use fixed width integers, including the latter, all over the place we make sure the complete file is included. Fixes #2425.
* utils: Make second argument to memxor() constTobias Brunner2017-07-052-2/+2
|
* leak-detective: Whitelisted memory leaks in FHH IMCs and IMVsAndreas Steffen2017-05-291-0/+3
|
* Migrate all enumerators to venumerate() interface changeTobias Brunner2017-05-262-8/+21
|
* utils: Add helper macros to read variadic arguments into local variablesTobias Brunner2017-05-261-2/+46
|
* chunk: Correctly parse Base64 text where four = follow in a rowTobias Brunner2017-05-231-1/+1
| | | | | | | That's not correct Base64 but invalid data could trigger this. Since outlen would get reduced four times, but is only ever increased three times per iteration, this could result in an integer underflow and then a potential buffer overflow.
* utils: chunk_from_hex() skips optional 0x prefixAndreas Steffen2017-03-061-1/+7
|
* libipsec: Fix Windows build via MinGWTobias Brunner2017-01-251-0/+7
| | | | Fixes #2118.
* leak-detective: Whitelist thread ID getterTobias Brunner2016-09-201-1/+3
| | | | | | | | In case an external thread calls into our code and logs messages, a thread object is allocated that will never be released. Even if we try to clean up the object via thread value destructor there is no guarantee that the thread actually terminates before we check for leaks, which seems to be the case for the Ada Tasking threads.
* leak-detective: Whitelist functions of the Ada runtime related to TaskingTobias Brunner2016-09-201-0/+4
|
* leak-detective: Whitelist some glib/libsoup functionsTobias Brunner2016-09-201-1/+13
| | | | | | Some of these are pretty broad, so maybe an alternative option is to not use the soup plugin in the openssl-ikev2/rw-suite-b* scenarios. But the plugin is not tested anywhere else so lets go with this for now.
* leak-detective: Whitelist leak in libldapTobias Brunner2016-09-201-0/+2
|
* utils: Fix definition of BYTE_ORDER with MinGWTobias Brunner2016-08-241-1/+5
|
* utils: Defined uletoh16() and htole16()Andreas Steffen2016-08-061-0/+42
|
* leak-detective: Try to properly free allocations after deinitializationTobias Brunner2016-06-291-0/+13
| | | | | | | | If a function we whitelist allocates memory while leak detective is enabled but only frees it after LD has already been disabled, free() will get called with invalid pointers (not pointing to the actually allocated memory by LD), which will cause checks in the C library to fail and the program to crash. This tries to detect such cases and calling free with the correct pointer.
* openssl: Whitelist OPENSSL_init_crypto() and others in leak detectiveTobias Brunner2016-06-291-0/+4
| | | | | | | | | Lots of static data is allocated in this function, which isn't freed until the library is unloaded (we can't call OPENSSL_cleanup() as initialization would fail when calling it again later). When enabling the leak detective the test runner eventually crashes as all the data allocated during initialization has an invalid size when freed after leak detective has been unloaded.
* leak-detective: Make sure to actually call malloc() from calloc() hookTobias Brunner2016-06-151-3/+4
| | | | | | | | Newer versions of GCC are too "smart" and replace a call to malloc(X) followed by a call to memset(0,X) with a call co calloc(), which obviously results in an infinite loop when it does that in our own calloc() implementation. Using `volatile` for the variable storing the total size prevents the optimization and we actually call malloc().
* leak-detective: Whitelist __fprintf_chk as seen on newer systemsTobias Brunner2016-06-151-0/+1
|
* identification: Compare identity types when comparing ID_FQDN/ID_RFC822_ADDR ↵Tobias Brunner2016-06-061-3/+4
| | | | | | identities References #1380.
* identification: Add support for dmdName RDN (2.5.4.54)Yannick Cann2016-04-252-0/+4
| | | | | | | It's listed in RFC 2256 but was later removed with RFC 4519, but there are still some certs that use it. Closes strongswan/strongswan#43.
* leak-detective: added _IO_file_doallocate to whitelistAndreas Steffen2016-04-241-0/+1
|
* chunk: Skip all leading zero bytes in chunk_skip_zero() not just the firstTobias Brunner2016-04-041-2/+2
|
* string: Gracefully handle NULL in str*eq() macrosTobias Brunner2016-04-041-4/+4
|
* byteorder: Explicitly check for htoXeXX macrosTobias Brunner2016-03-311-3/+18
| | | | | Some platforms have XetohXX macros instead of XeXXtoh macros, in which case we'd redefine the htoXeXX macros.
* utils: Remove nonsensical typedefs for standard uint typesTobias Brunner2016-03-311-13/+0
|
* Use standard unsigned integer typesAndreas Steffen2016-03-2414-78/+78
|
* android: Enable build against API level 21Tobias Brunner2016-03-231-0/+17
| | | | | | | While building against this level in general would break our app on older systems, the NDK will automatically use this level for 64-bit ABI builds (which are not supported in older levels). So to build against 64-bit ABIs we have to support this API level.
* Fix some Doxygen issuesTobias Brunner2016-03-111-3/+3
|
* identification: Make `written` signed to fix error checking when printing rangesTobias Brunner2016-03-111-3/+3
|
* Implemented IPv4/IPv6 subnet and range identitiesAndreas Steffen2016-03-101-31/+356
| | | | | | The IKEv1 IPV4_ADDR_SUBNET, IPV6_ADDR_SUBNET, IPV4_ADDR_RANGE and IPV6_ADDR_RANGE identities have been fully implemented and can be used as owners of shared secrets (PSKs).
* byteorder: Simplify htoun64/untoh64 functionsTobias Brunner2016-03-041-27/+0
|
* byteorder: Always define be64toh/htobe64 macrosTobias Brunner2016-03-041-20/+30
|
* libhydra: Remove empty unused libraryTobias Brunner2016-03-031-1/+0
|
* utils: Add enum name for pseudo log group 'any'Tobias Brunner2016-02-051-2/+4
|
* Support pseudonym RDNAndreas Steffen2016-01-272-0/+4
|
* byteorder: Provide a fallback for le32toh/htole32()Martin Willi2015-12-041-0/+20
| | | | | Some older toolchains don't provide these macros, so implement them using the gcc builtins. We also provide 64-bit variants as used by chapoly.
* byteorder: Add 32-bit unaligned little-endian conversion functionsMartin Willi2015-12-041-0/+27
|
* sigwaitinfo() may fail with EINTR if interrupted by an unblocked signal not ↵Tobias Brunner2015-11-231-1/+4
| | | | | | in the set Fixes #1213.
* utils: Use the more low-level __NR_ prefix to refer to the syscall numberTobias Brunner2015-11-171-1/+1
| | | | The __NR_ constants are also defined in the Android headers.
* utils: Provide a fallback for sigwaitinfo() if neededTobias Brunner2015-11-133-30/+36
| | | | | Apparently, not available on Mac OS X 10.10 Yosemite. We don't provide this on Windows.
* android: Provide a fallback for sigwaitinfo()Tobias Brunner2015-11-121-1/+29
|
* android: Replace AndroidConfigLocal.h with a header in utils/compatTobias Brunner2015-11-122-0/+34
|
* windows: Define RTLD_NOW, even if it is not usedTobias Brunner2015-11-091-0/+5
|
* Replace usages of sigwait(3) with sigwaitinfo(2)Tobias Brunner2015-10-291-2/+1
| | | | | | | This is basically the same call, but it has the advantage of being supported by FreeBSD's valgrind, which sigwait() is not. References #1106.
* Fix some Doxygen issuesTobias Brunner2015-08-272-2/+2
|
* identification: Remove unused ID_USER_ID typeTobias Brunner2015-08-172-11/+3
|
* utils: Check for dirfd(3)Tobias Brunner2015-08-171-0/+9
| | | | | Not all POSIX compatible systems might provide it yet. If not, we close the lowest FD to close and hope it gets reused by opendir().