Commit Graph

13102 Commits

Author SHA1 Message Date
Tobias Brunner 5c38a5ea83 Remove ITA references 2018-08-31 11:11:12 +02:00
Tobias Brunner 85a6fe2306 ikev1: Signal IKE_SA connection failure via bus
This is mainly for HA where a passive SA was already created when the
IKE keys were derived.  If e.g. an authentication error occurs later that
SA wouldn't get cleaned up.
2018-08-31 11:05:39 +02:00
Tobias Brunner 4899a4c025 aggressive-mode: Trigger alerts for authentication failures 2018-08-31 11:02:43 +02:00
Tobias Brunner f32402f58e main-mode: Local identity is always defined 2018-08-31 11:02:43 +02:00
Tobias Brunner 78b3c9e2df main-mode: Also trigger a PEER_AUTH_FAILED alert if authorize() fails 2018-08-31 11:02:43 +02:00
Thomas Egerer 095db2ed91 main-mode: Signal local/peer auth failure via bus
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2018-08-31 11:02:43 +02:00
Thomas Egerer 32c190634c custom-logger: Add optional reload method
The reload of the configuration of the loggers so far only included
the log levels. In order to support the reload of all other options,
a reload function may be implemented.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2018-08-29 15:55:33 +02:00
Tobias Brunner c163a53a3a ike-sa-manager: Log message when scheduling delete for reauthenticated IKE_SA 2018-08-29 15:46:37 +02:00
Tobias Brunner c993eaf9d1 kernel: Add option to control DS field behavior 2018-08-29 11:36:04 +02:00
Tobias Brunner dc8b015d78 kernel: Add options to control DF and ECN header bits/fields via XFRM
The options control whether the DF and ECN header bits/fields are copied
from the unencrypted packets to the encrypted packets in tunnel mode (DF only
for IPv4), and for ECN whether the same is done for inbound packets.

Note: This implementation only works with Linux/Netlink/XFRM.

Based on a patch by Markus Sattler.
2018-08-29 11:36:04 +02:00
Tobias Brunner de4c3d2e76 vici: Add error handling to message parsing in Perl bindings 2018-08-29 11:32:21 +02:00
Afschin Hormozdiary d6aa6537e7 vici: Improve message parsing performance in Perl bindings
During a test with ~12000 established SAs it was noted that vici
related operations hung.
The operations took over 16 minutes to finish. The time was spent in
the vici message parser, which was assigning the message over and over
again, to get rid of the already parsed portions.

First fixed by cutting the consumed parts off without copying the message.
Runtime for ~12000 SAs is now around 20 seconds.

Further optimization brought the runtime down to roughly 1-2 seconds
by using an fd to read through the message variable.

Closes strongswan/strongswan#103.
2018-08-29 11:31:38 +02:00
Thomas Egerer 5100a3ed7d kernel-netlink: Align concatenated Netlink responses
The code to support parallel Netlink queries (commit 3c7193f) made use
of nlmsg_len member from struct nlmsghdr to allocate and copy the
responses. Since NLMSG_NEXT is later used to parse these responses, they
must be aligned, or the results are undefined.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2018-08-23 16:34:25 +02:00
Tobias Brunner 2ff4983adc libimcv: Fix Android.mk 2018-08-10 10:10:00 +02:00
Vishal Rana 41fed536e8 libtpmtss: Fixed Android.mk
Closes strongswan/strongswan#111

Signed-off-by: Vishal Rana <vr@labstack.com>
2018-08-10 10:09:43 +02:00
Tom Schlenkhoff 46f482ca54 README: Fix typos
Closes strongswan/strongswan#110.
2018-08-06 16:57:04 +02:00
Andreas Steffen 6a59e1fa9e tnccs-20: Defer handshake retry when sending SRETRY batch
Set a retry_handshake flag on a TNC server when sending a SRETRY
batch and do the retry only after receiving the next CDATA batch
from the TNC client.
2018-08-01 15:44:49 +02:00
Andreas Steffen 731e043c8e libimcv: Reset of IMC state for new measurement cycle 2018-08-01 15:44:49 +02:00
Andreas Steffen 25973c0350 libimcv: Reset of IMV state for new measurement cycle 2018-08-01 15:44:49 +02:00
Andreas Steffen 37c12f98b0 imv-swima: Support subscriptions 2018-07-30 12:06:34 +02:00
Andreas Steffen f649a13cc6 imc-swima: Support subscriptions 2018-07-29 10:37:36 +02:00
Andreas Steffen ff9bac6ab8 libimcv: Missing comma in pa_tnc_error_code_names 2018-07-24 22:49:45 +02:00
Andreas Steffen b9d6b3c3e2 libtpmss: Configure TCTI device options 2018-07-20 19:19:24 +02:00
Andreas Steffen 5fbb8b6a4a libimcv: Added Debian 8.11 and Ubunut 18.04 to IMV database 2018-07-19 14:11:44 +02:00
Andreas Steffen fd21c40b6c libtpmtss: Support of RSAPSS signature scheme 2018-07-19 12:40:42 +02:00
Andreas Steffen e74e920bbc libtpmtss: Support for TSS2 v2 libraries 2018-07-19 12:40:42 +02:00
Tobias Brunner 9403320fca message: Report the size of the complete reassembled IKE message
This way we see the same size on both ends, namely that of the complete
IKE message as if it was sent in a single packet (excluding UDP/IP headers).
2018-07-09 17:49:07 +02:00
Tobias Brunner 62721936b1 encrypted-payload: Change how the length for reassembled messages is calculated
If we have an AEAD transform we add the overhead as if the data would have
been transported in a single encrypted payload.
2018-07-09 17:25:02 +02:00
Tobias Brunner cc1f01e009 encrypted-payload: Add getter for the used AEAD transform 2018-07-09 17:15:07 +02:00
SC Lee 3a41febb1c charon-nm: Parse any type of private key in need_secrets
Previously, when the user supplied an ECDSA key for public key authentication,
the user was always asked to provide a password, even if the key was not
encrypted.

Related: 954f73ea6e ("charon-nm: Parse any type of private key not only RSA")
Closes strongswan/strongswan#108.
2018-07-09 12:21:43 +02:00
Tobias Brunner c798b94a43 kernel-pfkey: Add support for native ChaCha20/Poly1305 on macOS 2018-07-06 10:25:56 +02:00
Ruben Tytgat e2b8c7e6ed kernel-pfkey: Enable macOS native AES_GCM_ICV16 support
macOS supports AES_GCM_ICV16 natively using PF_KEYv2.

This change enables AES_GCM if the corresponding definition is detected
in the headers.

With this change it is no longer necessary to use the libipsec module to
use AES_GCM on macOS.

Closes strongswan/strongswan#107.
2018-07-06 10:25:55 +02:00
Tobias Brunner 4802a7477f android: New release after fixing EAP-PEAP issue and Autofill crash 2018-07-04 20:02:23 +02:00
Tobias Brunner ba9255b358 Revert "android: Enable the eap-ttls and eap-peap plugins"
This reverts commit 064c97afae.

We have to make this optional and more configurable.  It seems some
commercial VPN providers use self-signed certificates for their AAA
servers.
2018-07-04 19:36:50 +02:00
Tobias Brunner b2363b3678 android: Move hint from TextInputEditText to TextInputLayout
This avoids a NullPointerException on Android 8 related to the optional
Autofill functionality.  The bug has been fixed in Android 8.1 [1] but there
is no fix for Android 8.

[1] https://issuetracker.google.com/issues/67675432
2018-07-04 11:52:32 +02:00
Tobias Brunner 485d202adc android: Don't enforce the server address as AAA identity for EAP-PEAP/TTLS
This is similar to EAP-TLS.  We could probably make this configurable
later.
2018-07-04 11:52:23 +02:00
Tobias Brunner 07237f94e2 android: New release after fixing cancelling connecting on older systems 2018-07-03 15:44:36 +02:00
Tobias Brunner 4e905b96dd android: Poll dropper TUN device for data on older Android systems
It seems that even the NIO version of read() is uninterruptible on
platforms < Android 7 (24).
2018-07-03 15:35:29 +02:00
Tobias Brunner abb4a4c825 android: New version after adding lots of new features 2018-07-03 11:38:46 +02:00
Tobias Brunner 9e05f219fd android: Use ListView for log messages
This is hopefully a bit more efficient for large log files than the previous
single TextView.  The ListView widget also provides an auto-scroll mechanism.
2018-07-03 11:31:44 +02:00
Tobias Brunner 3f71118b08 android: Simplify error handling in VPN state fragment
Always reset the error state when disconnecting via state service. This
way the error state is also cleared when the connection is terminated
directly via control activity.
2018-07-03 11:31:44 +02:00
Tobias Brunner 00a9ff4085 android: Remove MIME type filter when importing trusted certificates
This way we should see files even if the MIME type has not been set
correctly while downloading it.
2018-07-03 11:31:44 +02:00
Tobias Brunner 27cf3e666e android: Show date/thread prefix in log view if we have enough space
This is the case for tablets or even phones in landscape orientation.
600dp is the breaking point for small tablets according to Google's
docs.
2018-07-03 11:31:44 +02:00
Tobias Brunner 19c95c9bc4 android: Change log message when initializing the native code and add a divider
We don't really start a daemon and the divider should make it easier to
identify retries.
2018-07-03 11:31:44 +02:00
Tobias Brunner ef0f0cc839 android: Don't use infinite keying tries on Android 5+
This way we get some feedback about the issue in the GUI (otherwise it
would just switch to connecting state) and also some delays between retries.
2018-07-03 11:31:43 +02:00
Tobias Brunner a2b3122865 android: Allow explicit termination of a profile without confirmation 2018-07-03 11:31:43 +02:00
Tobias Brunner baf2f47413 android: Handle restarts of the control Activity better
For instance, rotating a device will restart it and this previously
could have started the wrong profile or shown the system's VPN
confirmation dialog twice.
2018-07-03 11:31:43 +02:00
Tobias Brunner 4db3bf0cb0 android: Properly handle pressing home when VPN confirmation dialog is shown
As documented, onActivityResult() is called right before onResume() when
the activity is reactivated.  However, if the system's VPN confirmation
dialog is shown and the home button is pressed, the activity is stopped
and not just paused, so its state is saved.  And onActivityResult() is
actually also called before onStart().  This means that no fragment
transactions may be committed (i.e. no dialog may be shown) when the
activity is later restarted (e.g. because there is another attempt to
connect the VPN) until onStart() has been called.  So if we'd try to show
the error dialog in onActivityResult() after returning to the launcher
it would result in an IllegalStateException.

However, showing the dialog for the previous confirmation dialog is not
ideal anyway, so we just ignore that result.
2018-07-03 11:31:43 +02:00
Tobias Brunner b1b626a1e3 android: Crudely catch exception if no file browser is available
Seen on Android TV in the emulator.
2018-07-03 11:31:43 +02:00
Tobias Brunner 064c97afae android: Enable the eap-ttls and eap-peap plugins 2018-07-03 11:31:43 +02:00