aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan
Commit message (Collapse)AuthorAgeFilesLines
...
* ikev2: Don't use SHA-1 for RFC 7427 signature authenticationTobias Brunner2017-11-082-4/+4
| | | | | | RFC 8247 demoted it to MUST NOT. References #2427.
* pkcs11: Call C_Finalize() to cancel jobs waiting in C_WaitForSlotEvent()Tobias Brunner2017-11-021-9/+14
| | | | | | | | | | | | | | | | This is not ideal as the call to C_Finalize() should be the last one via the PKCS#11 API. Since the order in which jobs are canceled is undefined we can't be sure there is no other thread still using the library (it could even be the canceled job that still handles a previous slot event). According to PKCS#11 the behavior of C_Finalize() is undefined while other threads still make calls over the API. However, canceling the thread, as done previously, could also be problematic as PKCS#11 libraries could hold locks while in the C_WaitForSlotEvent() call, which might not get released properly when the thread is just canceled, and which then might cause later calls to other API functions to block. Fixes #2437.
* utils: Add helper function to parse time spans from stringsTobias Brunner2017-11-024-42/+132
|
* asn1: Add additional OIDs seen in certificate DNsTobias Brunner2017-11-022-0/+6
|
* openssl: Also load EC keys from an ENGINETobias Brunner2017-11-025-155/+168
|
* streams: Remove registered systemd stream serviceTobias Brunner2017-10-181-0/+3
| | | | Fixes: 59db98fb941c ("stream: Add basic stream service for systemd sockets")
* streams: Named systemd sockets are only supported since systemd v227Tobias Brunner2017-10-131-0/+6
|
* watcher: Don't notify watcher if removed FD was not foundTobias Brunner2017-10-101-2/+6
| | | | | | | | | | | | This can happen if a stream is used blocking exclusively (the FD is never registered with watcher, but is removed in the stream's destructor just in case it ever was - doing this conditionally would require an additional flag in streams). There may be no thread reading from the read end of the notify pipe (e.g. in starter), causing the write to the notify pipe to block after it's full. Anyway, doing a relatively expensive FD update is unnecessary if there were no changes. Fixes #1453.
* stream: Add basic stream service for systemd socketsaszlig2017-10-104-0/+118
| | | | | | | | | | | | | | | | | | | | | | | | This allows systemd socket activation by passing URIs such as systemd://foo to plugins such as VICI. For example setting charon.plugins.vici.socket = systemd://vici, a systemd socket file descriptor with the name "vici" will be picked up. So these would be the corresponding unit options: [Socket] FileDescriptorName=vici Service=strongswan.service ListenStream=/run/charon.vici The implementation currently is very basic and right now only the first file descriptor for a particular identifier is picked up if there are multiple socket units with the same FileDescriptorName. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Closes strongswan/strongswan#79.
* openssl: Fix call of X509_CRL_get0_signature() with OpenSSL 1.1.0Tobias Brunner2017-10-101-3/+3
| | | | | | | The order of arguments in X509_CRL_get0_signature() is not the same as that of X509_get0_signature(). Fixes: 989ba4b6cd16 ("openssl: Update CRL API to OpenSSL 1.1.0")
* configure: Fix gperf length parameter determinationTobias Brunner2017-10-023-2/+11
| | | | | | | | | | gperf is not actually a build dependency as the generated files are shipped in the tarball. So the type depends on the gperf version on the host that ran gperf and created the tarball, which might not be the same as that on the actual build host, and gperf might not even be installed there, leaving the type undetermined. Fixes: e0e43229736a ("configure: Detect type of length parameter for gperf generated function")
* configure: Detect type of length parameter for gperf generated functionTobias Brunner2017-09-191-1/+1
| | | | | Since 3.1 gperf uses size_t for the length parameter instead of an unsigned int.
* 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.
* bliss: Fix compile error of unit tests due to uninitialized variableTobias Brunner2017-09-181-1/+1
|
* settings: Fix possible undefined behavior with va_start() and boolTobias Brunner2017-09-182-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes compilation with -Werror when using Clang 4.0 (but not 3.9) and possibly prevents undefined behavior. According to the C standard the following applies to the second parameter of the va_start() macro (subclause 7.16.1.4, paragraph 4): The parameter parmN is the identifier of the rightmost parameter in the variable parameter list in the function definition (the one just before the ...). If the parameter parmN is declared with the register storage class, with a function or array type, or with a type that is not compatible with the type that results after application of the default argument promotions, the behavior is undefined. Because bool is usually just 1 byte and therefore smaller than int (i.e. the result of default argument promotion) its use as last argument before ... might result in undefined behavior. This theoretically can also apply to enums as a compiler may use a smaller base type than int. Since Clang 3.9 (currently in use on Travis by default) a warning is issued about this, however, that version did not yet compare the actual size of the argument's type, causing warnings where they are not warranted (basically for all cases where enum types are used for the last argument). This was apparently fixed with Clang 4.0, which only warns about this use of bool with va_start(), which makes sense.
* Define MODP_CUSTOM constructors as variadic functionsTobias Brunner2017-09-188-22/+28
| | | | | | They now match the dh_constructor_t signature. This is a follow up for the changes merged with b668bf3f9ec1 and should fix use of MODP_CUSTOM on Apple's ARM64 platform.
* plugin-loader: Correctly read dlopen_use_rtld_now optionTobias Brunner2017-09-181-1/+1
| | | | Fixes: 305c4aa82cb0 ("plugin-loader: Optionally use RTLD_NOW with dlopen()")
* openssl: Add support for delta CRLsTobias Brunner2017-09-182-19/+74
|
* certificates: Use shared destructor for x509_cdp_tTobias Brunner2017-09-185-35/+20
|
* traffic-selector: Use single buffer for both address familiesTobias Brunner2017-08-172-159/+102
| | | | | | | | The generic field of size 0 in the union that was used previously triggered index-out-of-bounds errors with the UBSAN sanitizer that's used on OSS-Fuzz. Since the two family specific union members don't really provide any advantage, we can just use a single buffer for both families to avoid the errors.
* plugin-loader: Move indent variables into !USE_FUZZING blockTobias Brunner2017-08-151-2/+2
| | | | This avoids compile errors on Travis.
* gmp: Fix RSA signature verification for m >= nTobias Brunner2017-08-141-3/+9
| | | | | | | | By definition, m must be <= n-1, we didn't enforce that and because mpz_export() returns NULL if the passed value is zero a crash could have been triggered with m == n. Fixes CVE-2017-11185.
* Fixed some typos, courtesy of codespellTobias Brunner2017-08-072-2/+2
|
* sha2: Write final hash directly to output bufferTobias Brunner2017-08-071-56/+26
| | | | | | This avoids having the last output in internal memory that's not wiped. References #2388.
* prf-plus: Wipe seed and internal bufferTobias Brunner2017-08-071-2/+2
| | | | | | | The buffer contains key material we handed out last and the seed can contain the DH secret. References #2388.
* child-sa: Allow requesting different unique marks for in/outEyal Birger2017-08-072-2/+17
| | | | | | | | | | | | | | | | | | | | When requiring unique flags for CHILD_SAs, allow the configuration to request different marks for each direction by using the %unique-dir keyword. This is useful when different marks are desired for each direction but the number of peers is not predefined. An example use case is when implementing a site-to-site route-based VPN without VTI devices. A use of 0.0.0.0/0 - 0.0.0.0/0 traffic selectors with identical in/out marks results in outbound traffic being wrongfully matched against the 'fwd' policy - for which the underlay 'template' does not match - and dropped. Using different marks for each direction avoids this issue as the 'fwd' policy uses the 'in' mark will not match outbound traffic. Closes strongswan/strongswan#78.
* unit-tests: Double escape backslashes in Windows paths in settings testTobias Brunner2017-07-281-2/+6
| | | | | That's required when these are used as include paths in settings file strings.
* unit-tests: iv_gen_seq has a dependency on RNG_STRONGTobias Brunner2017-07-281-1/+1
| | | | We currently don't have an RNG in Windows builds.
* credential-manager: Log issuer identity if not foundTobias Brunner2017-07-271-0/+2
|
* auth-cfg: Don't limit subjectAltName check to received certificatesTobias Brunner2017-07-271-1/+1
| | | | Otherwise this won't work if the certificate is only locally available.
* curl: Enable following redirectsTobias Brunner2017-07-271-0/+9
| | | | | | | The maximum number of redirects can be limited. The functionality can also be disabled. Fixes #2366.
* imv-swima: Implemented SW event processingAndreas Steffen2017-07-081-2/+12
|
* x509: Correctly encode nonce in OCSP requestTobias Brunner2017-07-071-1/+2
| | | | | The nonce value is encoded as OCTET STRING, however, the extension values themselves must also be encoded as OCTET STRING.
* utils: Make second argument to memxor() constTobias Brunner2017-07-052-2/+2
|
* android: Enable revocation pluginTobias Brunner2017-07-031-0/+2
|
* android: Use LOCAL_LDLIBS to link libdlTobias Brunner2017-07-031-1/+1
| | | | Newer NDKs fail otherwise as there is no actual module anymore.
* configure: Enable coverage for all plugins via PLUGIN_CFLAGSTobias Brunner2017-06-203-6/+3
|
* openssl: Properly handle flags in key usage extensionTobias Brunner2017-06-141-8/+6
|
* x509: nameConstraints sequence does not require a loopAndreas Steffen2017-05-291-2/+1
| | | | Fixes: CVE-2017-9023
* unit-tests: Updated asn1-parser testsAndreas Steffen2017-05-291-1/+105
|
* asn1-parser: Fix CHOICE parsingAndreas Steffen2017-05-293-75/+134
| | | | Fixes: CVE-2017-9023
* gmp: Make sure the modulus is odd and the exponent not zeroTobias Brunner2017-05-291-1/+6
| | | | | | | | | Unlike mpz_powm() its secure replacement mpz_powm_sec() has the additional requirement that the exponent must be > 0 and the modulus has to be odd. Otherwise, it will crash with a floating-point exception. Fixes: CVE-2017-9022 Fixes: 3e35a6e7a1b0 ("Use side-channel secured mpz_powm_sec of libgmp 5, if available")
* leak-detective: Whitelisted memory leaks in FHH IMCs and IMVsAndreas Steffen2017-05-291-0/+3
|
* Fixed some typos, courtesy of codespellTobias Brunner2017-05-261-1/+1
|
* linked-list: Change return value of find_first() and signature of its callbackTobias Brunner2017-05-267-73/+161
| | | | This avoids the unportable five pointer hack.
* linked-list: Change interface of callback for invoke_function()Tobias Brunner2017-05-263-16/+21
| | | | This avoids the unportable five pointer hack.
* linked-list: invoke_offset() doesn't take any additional arguments anymoreTobias Brunner2017-05-263-18/+16
|
* Change interface for enumerator_create_filter() callbackTobias Brunner2017-05-2613-359/+517
| | | | | This avoids the unportable 5 pointer hack, but requires enumerating in the callback.
* Migrate all enumerators to venumerate() interface changeTobias Brunner2017-05-2623-304/+409
|
* enumerator: Add venumerate() method to enumerator_t that takes a va_listTobias Brunner2017-05-262-8/+51
| | | | | | | | | | This will allow us to implement e.g. enumerator_cleaner without having to use that unportable 5 pointer forwarding or having to define a callback for each instance. A generic implementation for enumerate() is provided so only venumerate() has to be implemented, which may be simplified by using the VA_ARGS_VGET() macro.