aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* eap-radius: Optionally send Class attributes in RADIUS accounting messagesTobias Brunner2017-11-024-21/+87
| | | | | | | If enabled, add the RADIUS Class attributes received in Access-Accept messages to RADIUS accounting messages as suggested by RFC 2865 section 5.25. Fixes #2451.
* ikev2: Abort make-before-break reauth if we don't find children to recreateTobias Brunner2017-11-021-1/+19
| | | | | | | We do something similar in reestablish() for break-before-make reauth. If we don't abort we'd be sending an IKE_AUTH without any TS payloads. References #2430.
* openssl: Also load EC keys from an ENGINETobias Brunner2017-11-025-155/+168
|
* libcharon: Added Cisco FlexVPN Supported VIDAndreas Steffen2017-10-271-0/+2
|
* unit-tests: Fix "using integer constants in boolean context" warningTobias Brunner2017-10-231-12/+12
| | | | | This warning has been seen in GCC 7.x with -Wall, however, because == has higher precedence than ?: the code was actually not correct.
* 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-132-0/+10
|
* starter: Add the correct keywords header file to EXTRA_DISTTobias Brunner2017-10-122-3/+3
| | | | | | | | | | | The fix for gperf in 0ae19f0ced8d added the generated header to EXTRA_DIST but that's already added to the distribution because it is contained in *_SOURCES, what was not added, though, was the .h.in file. Also fixes the reference to the header file in the .c rule here and for stroke in out-of-tree builds. Fixes: 0ae19f0ced8d ("configure: Fix gperf length parameter determination")
* 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.
* starter: Don't define any hard-coded proposal stringsTobias Brunner2017-10-101-9/+0
| | | | | | | | Just rely on the default proposals by charon if nothing is defined. The hard-coded IKE proposal used curve25519, which depends on an optional plugin (while enabled by default it might still not be loaded, or, like on Debian, shipped in an optional package). With charon's default proposal only loaded algorithms are proposed for IKE avoiding this issue.
* configure: Also check for libcrypto on WindowsTobias Brunner2017-10-101-5/+12
| | | | | | With OpenSSL 1.1.0 the library is now named libcrypto too on Windows. Check for libeay32 first so we don't link against the build environment's version of OpenSSL instead of the native one that might be available.
* 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")
* kernel-netlink: Add strings for newer XFRM attribute typesTobias Brunner2017-10-061-1/+6
|
* configure: Fix gperf length parameter determinationTobias Brunner2017-10-0212-15/+39
| | | | | | | | | | 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")
* libimcv: Renamed SW Request to SWIMA RequestAndreas Steffen2017-09-271-1/+1
|
* Version bump to 5.6.1dr35.6.1dr3Andreas Steffen2017-09-262-2/+2
|
* SWIMA attribute name changesAndreas Steffen2017-09-2611-36/+36
| | | | | draft-ietf-sacm-nea-swima-patnc-01 changes some SWIMA attribute names.
* kernel-pfroute: Delay call to if_indextoname(3) when handling RTM_IFINFOTobias Brunner2017-09-261-0/+5
| | | | | | | It seems that there is a race, at least in 10.13, that lets if_indextoname() fail for the new TUN device. So we delay the call a bit, which seems to "fix" the issue. It's strange anyway that the previous delay was only applied when an iface entry was already found.
* controller: Consider any IKE_SA destruction as success when terminatingTobias Brunner2017-09-251-4/+1
|
* configure: Detect type of length parameter for gperf generated functionTobias Brunner2017-09-194-6/+21
| | | | | 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.
* sec-updater: Make sure `success` is initializedTobias Brunner2017-09-181-1/+1
|
* dhcp: Fix warning regarding unaligned pointer value due to packed structTobias Brunner2017-09-181-1/+1
| | | | We don't need to access this as uint32_t so just cast it to a char*.
* dhcp: Don't use signed char for DHCP optionsTobias Brunner2017-09-181-1/+1
| | | | | | The value of DHCP_OPTEND is 255. When it is assigned this result in a sign change as the positive int constant is cast to a signed char and -1 results. Clang 4.0 complains about this.
* imv-agent: Fix get_attribute() call for preferred languageTobias Brunner2017-09-181-2/+2
|
* bliss: Fix compile error of unit tests due to uninitialized variableTobias Brunner2017-09-181-1/+1
|
* travis: Use Clang 4.0 instead of 3.9 due to va_start() warningsTobias Brunner2017-09-181-0/+13
| | | | | | | | | | | | This is a follow up on the issue documented in the previous commit. To build with -Werror and Clang 3.9 we'd have to change all enum arguments that are used as last argument before ... to e.g. u_int, which affects quite a lot of places (crypto-factory, MODP_CUSTOM constructors, auth-cfg, bus, vici-builder, vici-message). Besides that it doesn't look as nice it also seems a bit too much hassle just to cater to the whims of a particular version of one compiler, so we just don't build with that version on Travis and use 4.0 instead.
* 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.
* libtnccs: Correctly read dlopen_use_rtld_now optionTobias Brunner2017-09-182-2/+2
| | | | Fixes: 50e4aeb22f49 ("libtnccs: Optionally use RTLD_NOW to load IMC/IMVs with dlopen()")
* plugin-loader: Correctly read dlopen_use_rtld_now optionTobias Brunner2017-09-181-1/+1
| | | | Fixes: 305c4aa82cb0 ("plugin-loader: Optionally use RTLD_NOW with dlopen()")
* android: New release after adding delta CRL support and some bug fixesTobias Brunner2017-09-181-2/+2
|
* android: Ignore IllegalArgumentException for multicast addressesTobias Brunner2017-09-181-2/+23
| | | | | | Some Android versions seem to reject routes that use multicast addresses. Fixes #2420.
* openssl: Add support for delta CRLsTobias Brunner2017-09-182-19/+74
|
* certificates: Use shared destructor for x509_cdp_tTobias Brunner2017-09-186-46/+22
|
* child-create: Don't consider a DH group mismatch as failure as responderTobias Brunner2017-09-181-1/+0
| | | | | | | This causes problems e.g. on Android where we handle the alert (and reestablish the IKE_SA) even though it usually is no problem if the peer retries with the requested group. We don't consider it as a failure on the initiator either.
* libipsec: Make sure to expire the right SATobias Brunner2017-09-181-2/+9
| | | | | | | | | | | | | | If an IPsec SA is actually replaced with a rekeying its entry in the manager is freed. That means that when the hard expire is triggered a new entry might be found at the cached pointer location. So we have to make sure we trigger the expire only if we found the right SA. We could use SPI and addresses for the lookup, but this here requires a bit less memory and is just a small change. Another option would be to somehow cancel the queued job, but our scheduler doesn't allow that at the moment. Fixes #2399.
* Merge branch 'libipsec-ip-frag'Tobias Brunner2017-09-1812-7/+1374
|\ | | | | | | | | | | | | | | | | This fixes "packet too short" errors when parsing fragmented IPv4 packets and correctly determines the protocol in fragmented IPv6 packets. Protocol headers are only parsed in unfragmented IPv4 and IPv6 packets, or IPv4 first fragments. Closes strongswan/strongswan#80.
| * testing: Add libipsec/net2net-cert-ipv6 scenarioTobias Brunner2017-09-1811-0/+1311
| |
| * ip-packet: Correctly determine protocol in fragmented IPv6 packetsTobias Brunner2017-09-181-6/+57
| | | | | | | | | | | | We don't attempt to parse the transport headers for fragments, not even for the initial fragment (it's not guaranteed they contain the header, depending on the number and type of extension headers).
| * ip-packet: Fix "packet too short" error when parsing fragmented IPv4 packetsTobias Brunner2017-09-181-1/+6
|/ | | | | Only attempt to parse the transport header of an IPv4 packet if it's not fragmented or the first fragment.
* Merge branch 'tkm-cid-ref'Tobias Brunner2017-09-155-35/+157
|\ | | | | | | | | This fixes IKE_SA rekey collision handling and improves error handling if CHILD_SA setup fails.
| * charon-tkm: Reset ESA on child SA create failureAdrian-Ken Rueegsegger2017-09-151-0/+1
| | | | | | | | | | | | Since we are also releasing the ESA ID we have to make sure that the ESA context is reset and in a clean state in order for it to be actually reusable.
| * charon-tkm: Check for error when acquiring ESA IDAdrian-Ken Rueegsegger2017-09-151-0/+7
| |
| * charon-tkm: Fix AE context life-cycle handlingAdrian-Ken Rueegsegger2017-09-151-7/+10
| | | | | | | | | | | | Use new reference counting feature of ID manager for AE contexts and only perform reset if count is zero. Also, do not pass on AE ID as every IKE SA must decrement AE ID count once it is not used any longer.
| * charon-tkm: Return current refcount when releasing IDAdrian-Ken Rueegsegger2017-09-153-23/+23
| |
| * charon-tkm: Add acquire_ref method to ID managerAdrian-Ken Rueegsegger2017-09-153-0/+108
| | | | | | | | | | The function acquires a reference to the given context reference id for a specific context kind.
| * charon-tkm: Store context ids as int instead of boolAdrian-Ken Rueegsegger2017-09-151-5/+8
| | | | | | | | This is in preparation of making context ids refcountable.
| * charon-tkm: Add missing whitespace log messageAdrian-Ken Rueegsegger2017-09-151-1/+1
|/