6 years agocontroller: Use separate callbacks to track termination and initiation of SAs
Tobias Brunner [Fri, 6 May 2016 07:08:08 +0000 (09:08 +0200)]
controller: Use separate callbacks to track termination and initiation of SAs

If a local authentication failure occurs in IKEv1 we delete the IKE_SA, which
we don't want the controller to detect as success.

Fixes #1449.

6 years agoikev1: Queue INFORMATIONAL messages during XAuth
Tobias Brunner [Tue, 26 Apr 2016 10:44:49 +0000 (12:44 +0200)]
ikev1: Queue INFORMATIONAL messages during XAuth

Some peers send an INITIAL_CONTACT notify after they received our XAuth
username.  The XAuth task waiting for the third XAuth message handles
this incorrectly and closes the IKE_SA as no configuration payloads are
contained in the message.  We queue the INFORMATIONAL until the XAuth
exchange is complete to avoid this issue.

Fixes #1434.

6 years agoidentification: Compare identity types when comparing ID_FQDN/ID_RFC822_ADDR identities
Tobias Brunner [Wed, 6 Apr 2016 10:16:11 +0000 (12:16 +0200)]
identification: Compare identity types when comparing ID_FQDN/ID_RFC822_ADDR identities

References #1380.

6 years agoikev2: Handle INITIAL_CONTACT notifies also when peer is authenticated with EAP
Tobias Brunner [Tue, 5 Apr 2016 15:42:45 +0000 (17:42 +0200)]
ikev2: Handle INITIAL_CONTACT notifies also when peer is authenticated with EAP

Fixes #1380.

6 years agox509: Properly wrap keyid in authorityKeyIdentifier in attribute certificates
Tobias Brunner [Thu, 31 Mar 2016 10:14:47 +0000 (12:14 +0200)]
x509: Properly wrap keyid in authorityKeyIdentifier in attribute certificates

The correct encoding got lost in bdec2e4f5291 ("refactored openac and
its attribute certificate factory").

Fixes #1370.

6 years agop-cscf: Remove libhydra reference in Makefile
Tobias Brunner [Fri, 27 May 2016 16:24:59 +0000 (18:24 +0200)]
p-cscf: Remove libhydra reference in Makefile

6 years agoaf-alg: Silently skip probing algorithms if AF_ALG is not supported
Martin Willi [Thu, 19 May 2016 09:13:24 +0000 (11:13 +0200)]
af-alg: Silently skip probing algorithms if AF_ALG is not supported

If the af-alg plugin is enabled, but kernel support is missing, we get
an error line during startup for each probed algorithm. This is way too
verbose, so just skip probing if AF_ALG is unsupported.

6 years agoconfigure: Check for a potential -lpthread by using -ldl
Martin Willi [Wed, 18 May 2016 12:44:19 +0000 (14:44 +0200)]
configure: Check for a potential -lpthread by using -ldl

Some pthread library variants depend on libdl, hence we must pass such a
library to successfully build against libpthread.

6 years agoMerge branch 'test-timing'
Andreas Steffen [Sun, 15 May 2016 17:03:49 +0000 (19:03 +0200)]
Merge branch 'test-timing'

6 years agotesting: Changed gcrypt-ikev1 scenarios to swanctl
Andreas Steffen [Sun, 8 May 2016 13:16:24 +0000 (15:16 +0200)]
testing: Changed gcrypt-ikev1 scenarios to swanctl

6 years agotesting: wait until connections are loaded
Andreas Steffen [Mon, 2 May 2016 08:10:56 +0000 (10:10 +0200)]
testing: wait until connections are loaded

6 years agoVersion bump to 5.4.1dr4 5.4.1dr4
Andreas Steffen [Fri, 13 May 2016 10:49:52 +0000 (12:49 +0200)]
Version bump to 5.4.1dr4

6 years agovici: Put source distribution in the dist dir in the build directory
Tobias Brunner [Wed, 11 May 2016 12:32:10 +0000 (14:32 +0200)]
vici: Put source distribution in the dist dir in the build directory

This fixes the out-of-tree build.

6 years agomem-cred: Fix memory leak when replacing existing CRLs
Tobias Brunner [Mon, 2 May 2016 14:04:43 +0000 (16:04 +0200)]
mem-cred: Fix memory leak when replacing existing CRLs

Fixes #1442.

6 years agovici: Add target to build a source package and universal wheel of the Python package
Tobias Brunner [Wed, 11 May 2016 09:23:20 +0000 (11:23 +0200)]
vici: Add target to build a source package and universal wheel of the Python package

6 years agovici: Add README.rst to be used as description on PyPI
Tobias Brunner [Wed, 11 May 2016 09:11:44 +0000 (11:11 +0200)]
vici: Add README.rst to be used as description on PyPI

6 years agovici: Replace dr with dev in version numbers for the Python egg
Tobias Brunner [Tue, 10 May 2016 10:09:24 +0000 (12:09 +0200)]
vici: Replace dr with dev in version numbers for the Python egg

The versioning scheme used by Python (PEP 440) supports the rcN suffix
but development releases have to be named devN, not drN, which are
not supported and considered legacy versions.

6 years agovici: Update
Tobias Brunner [Tue, 10 May 2016 09:42:10 +0000 (11:42 +0200)]
vici: Update

6 years agovici: Ensure we read exactly the specified amount of bytes from the socket in Python
Tobias Brunner [Mon, 2 May 2016 13:14:40 +0000 (15:14 +0200)]
vici: Ensure we read exactly the specified amount of bytes from the socket in Python

recv() will return less bytes than specified (as that's the buffer size)
if not as many are ready to be read from the socket.

6 years agoVersion bump to 5.4.1dr3 5.4.1dr3
Andreas Steffen [Sun, 8 May 2016 07:06:16 +0000 (09:06 +0200)]
Version bump to 5.4.1dr3

6 years agoswanctl: indicate initiator and responder in --list-sas
Andreas Steffen [Sat, 7 May 2016 15:54:56 +0000 (17:54 +0200)]
swanctl: indicate initiator and responder in --list-sas

6 years agoVersion bump to 5.4.1dr2 5.4.1dr2
Andreas Steffen [Fri, 6 May 2016 20:29:32 +0000 (22:29 +0200)]
Version bump to 5.4.1dr2

6 years agoMerge branch 'fwd-policy-prio'
Andreas Steffen [Fri, 6 May 2016 20:28:44 +0000 (22:28 +0200)]
Merge branch 'fwd-policy-prio'

6 years agochild-sa: Install "outbound" FWD policy with lower priority
Tobias Brunner [Mon, 2 May 2016 12:21:30 +0000 (14:21 +0200)]
child-sa: Install "outbound" FWD policy with lower priority

This provides a fix if symmetrically overlapping policies are
installed as e.g. the case in the ikev2/ip-two-pools-db scenario:

  carol -----, moon
  alice -----, moon

Among others, the following FWD policies are installed on moon:

  src dst
    tmpl ...

  src dst

  src dst
    tmpl ...

  src dst

Because the network prefixes are the same for all of these they all have the
same priority.  Due to that it depends on the install order which policy gets
used.  For instance, a packet from to will match the
first as well as the last policy.  However, when handling the inbound
packet we have to use the first one as the packet will otherwise be
dropped due to a template mismatch.  And we can't install templates with
the "outbound" FWD policies as that would prevent using different
IPsec modes or e.g. IPComp on only one of multiple SAs.

Instead we install the "outbound" FWD policies with a lower priority
than the "inbound" FWD policies so the latter are preferred.  But we use
a higher priority than default drop policies would use (in case they'd
be defined with the same subnets).

6 years agokernel-netlink: Check proper watcher state in parallel mode
Tobias Brunner [Wed, 4 May 2016 13:39:51 +0000 (15:39 +0200)]
kernel-netlink: Check proper watcher state in parallel mode

After adding the read callback the state is WATCHER_QUEUED and it is
switched to WATCHER_RUNNING only later by an asynchronous job. This means
that a thread that sent a Netlink message shortly after registration
might see the state as WATCHER_QUEUED.  If it then tries to read the
response and the watcher thread is quicker to actually read the message
from the socket, it could block on recv() while still holding the lock.
And the asynchronous job that actually read the message and tries to queue
it will block while trying to acquire the lock, so we'd end up in a deadlock.

This is probably mostly a problem in the unit tests.

6 years agotrap-manager: Allow local address to be unspecified
Tobias Brunner [Wed, 27 Apr 2016 08:56:54 +0000 (10:56 +0200)]
trap-manager: Allow local address to be unspecified

If there is currently no route to reach the other peer we just default
to left=%any.  The local address is only really used to resolve
leftsubnet=%dynamic anyway (and perhaps for MIPv6 proxy transport mode).

Fixes #1375.

6 years agokernel-netlink: Order routes by prefix before comparing priority/metric
Tobias Brunner [Mon, 18 Apr 2016 16:39:35 +0000 (18:39 +0200)]
kernel-netlink: Order routes by prefix before comparing priority/metric

Metrics are basically defined to order routes with equal prefix, so ordering
routes by metric first makes not much sense as that could prefer totally
unspecific routes over very specific ones.

For instance, the previous code did break installation of routes for
passthrough policies with two routes like these in the main routing table:

  default via dev eth0 proto static dev eth0 proto kernel scope link src metric 1

Because the default route has no metric set (0) it was used, instead of the
more specific other one, to determine src and next hop when installing a route
for a passthrough policy for  Therefore, the installed route
in table 220 did then incorrectly redirect all local traffic to "next hop"

The same issue occurred when determining the source address while
installing trap policies.

Fixes 6b57790270fb ("kernel-netlink: Respect kernel routing priorities for IKE routes").
Fixes #1416.

6 years agoikev1: Activate DELETE tasks before other tasks in state ESTABLISHED
Tobias Brunner [Fri, 15 Apr 2016 10:04:32 +0000 (12:04 +0200)]
ikev1: Activate DELETE tasks before other tasks in state ESTABLISHED

Fixes #1410.

6 years agoikev1: Don't use rekeyed CHILD_SAs for rekey detection
Tobias Brunner [Wed, 20 Apr 2016 11:56:55 +0000 (13:56 +0200)]
ikev1: Don't use rekeyed CHILD_SAs for rekey detection

An old (already rekeyed) CHILD_SA would get switched back into CHILD_REKEYING
state.  And we actually want to change the currently installed CHILD_SA to
that state and later CHILD_REKEYED and properly call e.g. child_rekey() and
not do this again with an old CHILD_SA.  Instead let's only check installed
or currently rekeying CHILD_SAs (in case of a rekey collision).  It's also
uncommon that there is a CHILD_SA in state CHILD_REKEYED but none in state
CHILD_INSTALLED or CHILD_REKEYING, which could happen if e.g. a peer deleted
and recreated a CHILD_SA after a rekeying.  But in that case we don't want
to treat the new CHILD_SA as rekeying (e.g. in regards to events on the bus).

6 years agoikev1: Don't call updown hook etc. when deleting redundant CHILD_SAs
Tobias Brunner [Wed, 20 Apr 2016 12:14:05 +0000 (14:14 +0200)]
ikev1: Don't call updown hook etc. when deleting redundant CHILD_SAs

Fixes #1421.

6 years agoandroid: New release after fixing a crash during certificate imports
Tobias Brunner [Fri, 6 May 2016 10:50:51 +0000 (12:50 +0200)]
android: New release after fixing a crash during certificate imports

6 years agoandroid: Avoid IllegalStateException when importing certificates
Tobias Brunner [Fri, 6 May 2016 10:41:33 +0000 (12:41 +0200)]
android: Avoid IllegalStateException when importing certificates

When certificates are imported via Storage Access Framework we did handle
the selection directly in onActivityResult().  However, at that point the
activity might apparently not yet be resumed.  So committing
FragmentTransactions could result in IllegalStateExceptions due to the
potential state loss.  To avoid that we cache the returned URI and wait
until onPostResume() to make sure the activity's state is fully restored
before showing the confirmation dialog.

6 years agoswanctl: Do not display rekey times for shunts
Andreas Steffen [Thu, 5 May 2016 12:53:22 +0000 (14:53 +0200)]
swanctl: Do not display rekey times for shunts

6 years agoMerge branch 'list-conns-plus'
Andreas Steffen [Wed, 4 May 2016 16:16:32 +0000 (18:16 +0200)]
Merge branch 'list-conns-plus'

6 years agotesting: Use reauthentication and set CHILD_SA rekey time, bytes and packets limits
Andreas Steffen [Tue, 3 May 2016 16:24:55 +0000 (18:24 +0200)]
testing: Use reauthentication and set CHILD_SA rekey time, bytes and packets limits

6 years agovici list-conns sends reauthentication and rekeying time information
Andreas Steffen [Tue, 3 May 2016 15:33:43 +0000 (17:33 +0200)]
vici list-conns sends reauthentication and rekeying time information

6 years agoswanctl: --list-conns shows eap_id, xauth_id and aaa_id
Andreas Steffen [Fri, 29 Apr 2016 15:33:57 +0000 (17:33 +0200)]
swanctl: --list-conns shows eap_id, xauth_id and aaa_id

6 years agotesting: uses xauth_id in swanctl/xauth-rsa scenario
Andreas Steffen [Fri, 29 Apr 2016 15:33:21 +0000 (17:33 +0200)]
testing: uses xauth_id in swanctl/xauth-rsa scenario

6 years agoandroid: New release after reducing number of DH groups in proposal
Tobias Brunner [Wed, 4 May 2016 10:07:36 +0000 (12:07 +0200)]
android: New release after reducing number of DH groups in proposal

6 years agoproposal: Remove some weaker and rarely used DH groups from the default proposal
Tobias Brunner [Wed, 4 May 2016 09:26:38 +0000 (11:26 +0200)]
proposal: Remove some weaker and rarely used DH groups from the default proposal

This fixes an interoperability issue with Windows Server 2012 R2 gateways.
They insist on using modp1024 for IKE, however, Microsoft's IKEv2
implementation seems only to consider the first 15 DH groups in the proposal.
Depending on the loaded plugins modp1024 is now at position 17 or even
later, causing the server to reject the proposal.  By removing some of
the weaker and rarely used DH groups from the default proposal we make
sure modp1024 is among the first 15 DH groups.  The removed groups may
still be used by configuring custom proposals.

6 years agoandroid: Use separate label strings for text fields in login dialog
Tobias Brunner [Tue, 3 May 2016 08:43:27 +0000 (10:43 +0200)]
android: Use separate label strings for text fields in login dialog

In the profile editor the password is now marked as optional in the
label, which looks a bit strange in the login dialog.

6 years agoandroid: New release after GUI changes/additions
Tobias Brunner [Mon, 2 May 2016 16:50:44 +0000 (18:50 +0200)]
android: New release after GUI changes/additions

6 years agoMerge branch 'android-gui-updates'
Tobias Brunner [Mon, 2 May 2016 16:39:26 +0000 (18:39 +0200)]
Merge branch 'android-gui-updates'

Removes the progress dialogs while connecting/disconnecting, updates
the VPN profile editor (floating labels, helper texts) and allows
configuration of the remote identity (disables loose identity matching),
and selection of the local identity if certificates are used.

Also fixes an issue when redirected during IKE_AUTH and increases the
NAT-T keepalive interval.

Fixes #1403.

6 years agoandroid: Show selected user identity in profile list
Tobias Brunner [Sat, 30 Apr 2016 15:14:34 +0000 (17:14 +0200)]
android: Show selected user identity in profile list

This also readds the colons that were removed from the labels.

6 years agoandroid: Allow selection of user identity in GUI
Tobias Brunner [Sat, 30 Apr 2016 15:04:45 +0000 (17:04 +0200)]
android: Allow selection of user identity in GUI

6 years agoandroid: Add adapter for user ID selection
Tobias Brunner [Sat, 30 Apr 2016 14:59:00 +0000 (16:59 +0200)]
android: Add adapter for user ID selection

6 years agoandroid: Add helper function to TrustedCertificateEntry to get subjectAltNames
Tobias Brunner [Sat, 30 Apr 2016 14:11:45 +0000 (16:11 +0200)]
android: Add helper function to TrustedCertificateEntry to get subjectAltNames

Duplicates (e.g. with different types) are filtered.  If necessary we
could later perhaps add a prefix.

6 years agoandroid: Add auto-completion to remote ID and profile name
Tobias Brunner [Sat, 30 Apr 2016 11:11:49 +0000 (13:11 +0200)]
android: Add auto-completion to remote ID and profile name

This makes it easy to explicitly use the server's IP/hostname as remote
identity or use it in the profile name.

6 years agoandroid: Make remote identity configurable in the GUI
Tobias Brunner [Sat, 30 Apr 2016 10:25:49 +0000 (12:25 +0200)]
android: Make remote identity configurable in the GUI

6 years agoandroid: Use TextInputLayout in login dialog
Tobias Brunner [Mon, 2 May 2016 16:04:03 +0000 (18:04 +0200)]
android: Use TextInputLayout in login dialog

6 years agoandroid: Use TextInputLayoutHelper in profile editor
Tobias Brunner [Sat, 30 Apr 2016 08:42:00 +0000 (10:42 +0200)]
android: Use TextInputLayoutHelper in profile editor

This adds floating labels and helper texts to the form fields. It also
changed/added lots of strings in the editor.

6 years agoandroid: Add TextInputLayout child class that displays a helper text below the text...
Tobias Brunner [Fri, 29 Apr 2016 16:15:29 +0000 (18:15 +0200)]
android: Add TextInputLayout child class that displays a helper text below the text field

Also hides the error message if the text is changed.

6 years agoandroid: Use proper namespace for custom attribute
Tobias Brunner [Fri, 29 Apr 2016 14:20:55 +0000 (16:20 +0200)]
android: Use proper namespace for custom attribute

6 years agoandroid: Move profile name field to the bottom and use server address as hint
Tobias Brunner [Fri, 29 Apr 2016 13:37:35 +0000 (15:37 +0200)]
android: Move profile name field to the bottom and use server address as hint

6 years agoandroid: Use configured local identity in auth-cfgs
Tobias Brunner [Fri, 29 Apr 2016 11:00:43 +0000 (13:00 +0200)]
android: Use configured local identity in auth-cfgs

We still default to the username or subject DN if none is configured.
But we don't check if the local ID is contained in the configured

6 years agoandroid: Use configured remote ID in auth-cfg
Tobias Brunner [Fri, 29 Apr 2016 10:48:40 +0000 (12:48 +0200)]
android: Use configured remote ID in auth-cfg

If one is explicitly set we don't use loose identity matching and send it as
IDr to the server.

Closes #strongswan/strongswan#29.
Fixes #1268.

6 years agoandroid: Pass local and remote identities as settings of a connection
Tobias Brunner [Fri, 29 Apr 2016 10:34:59 +0000 (12:34 +0200)]
android: Pass local and remote identities as settings of a connection

6 years agoandroid: Add fields for local and remote identities to data model
Tobias Brunner [Fri, 29 Apr 2016 10:27:38 +0000 (12:27 +0200)]
android: Add fields for local and remote identities to data model

6 years agoandroid: Avoid races between FragmentManager and state saving
Tobias Brunner [Thu, 28 Apr 2016 17:35:56 +0000 (19:35 +0200)]
android: Avoid races between FragmentManager and state saving

onSaveInstanceState is apparently called after pausing the fragment and after
that committing any FragmentTransactions causes an IllegalStateException.
We could use commitAllowingStateLoss() but that's not really necessary
as we don't need to update when we are not active anyway.  We also don't
update the view directly after registration as this happens
asynchronously, i.e. we might be paused when it finishes.

6 years agoandroid: Increase the NAT-T keepalive interval to potentially save battery life
Tobias Brunner [Thu, 28 Apr 2016 15:06:03 +0000 (17:06 +0200)]
android: Increase the NAT-T keepalive interval to potentially save battery life

In case this doesn't work out we could probably make it configurable.

References #1326.

6 years agoandroid: Show confirmation dialog also when connecting
Tobias Brunner [Mon, 2 May 2016 16:19:26 +0000 (18:19 +0200)]
android: Show confirmation dialog also when connecting

6 years agoandroid: Avoid ProgressDialogs in VPN state fragment
Tobias Brunner [Thu, 28 Apr 2016 12:46:10 +0000 (14:46 +0200)]
android: Avoid ProgressDialogs in VPN state fragment

Instead we use a ProgressBar directly in the fragment and use the
existing button to cancel the process.

6 years agoandroid: Fix display of remediation instructions with support library
Tobias Brunner [Thu, 28 Apr 2016 15:00:27 +0000 (17:00 +0200)]
android: Fix display of remediation instructions with support library

Because the support library creates its own layout manually and uses
different IDs than the list_content layout we can't use the method we
used previously (and which is actually recommended in the docs).

6 years agoandroid: Use Fragment class from the support library to avoid deprecation warnings
Tobias Brunner [Thu, 28 Apr 2016 07:21:06 +0000 (09:21 +0200)]
android: Use Fragment class from the support library to avoid deprecation warnings

For instance, onAttach() with an Activitiy as first argument was deprecated
with API level 23.  However, the overload with a Context as first argument
does obviously not get called on older API levels.  Luckily, the classes
provided by the support library handle that for us.

6 years agoandroid: Update README.ndk
Tobias Brunner [Wed, 27 Apr 2016 13:21:03 +0000 (15:21 +0200)]
android: Update README.ndk

6 years agoandroid: Use relative path for strongSwan sources
Tobias Brunner [Wed, 27 Apr 2016 13:11:54 +0000 (15:11 +0200)]
android: Use relative path for strongSwan sources

This avoids issues with recursion, which could have happened if the
strongswan directory was a symlink.

6 years agoandroid: Fix handling of redirects during IKE_AUTH
Tobias Brunner [Wed, 27 Apr 2016 12:55:43 +0000 (14:55 +0200)]
android: Fix handling of redirects during IKE_AUTH

6 years agoMerge branch 'android-tabs'
Tobias Brunner [Wed, 27 Apr 2016 12:35:47 +0000 (14:35 +0200)]
Merge branch 'android-tabs'

This migrates some deprecated Android APIs to replacements provided by
the support library.  This also changes the theme slightly.

6 years agoandroid: Fix color of lists and buttons on older platforms
Tobias Brunner [Tue, 26 Apr 2016 14:29:35 +0000 (16:29 +0200)]
android: Fix color of lists and buttons on older platforms

This adds a workaround for an issue on older platforms where the list is
not properly styled with colorAccent.  Similarly applies to borderless buttons.

6 years agoandroid: Use Activity as context for VpnProfileAdapter to fix theme
Tobias Brunner [Fri, 15 Apr 2016 11:21:22 +0000 (13:21 +0200)]
android: Use Activity as context for VpnProfileAdapter to fix theme

When using the application context theme customizations wouldn't get
applied for some reason.

6 years agoandroid: Use "server" instead of "gateway" in profile editor
Tobias Brunner [Tue, 12 Apr 2016 16:33:14 +0000 (18:33 +0200)]
android: Use "server" instead of "gateway" in profile editor

The term "gateway" is unfamiliar for most new users (or they confuse it
with the default gateway of their network) but they usually know that
they want to connect to a "server".

6 years agoandroid: Define a new color scheme
Tobias Brunner [Tue, 12 Apr 2016 15:46:53 +0000 (17:46 +0200)]
android: Define a new color scheme

This mainly changes the color of the appbar (colorPrimary), the color
of the status bar (colorPrimaryDark) is black like the default.
The accent color (colorAccent) used for controls like buttons and check
boxes is a slightly toned down version of the default.

6 years agoandroid: Get a warning on use of deprecated features
Tobias Brunner [Tue, 12 Apr 2016 15:43:39 +0000 (17:43 +0200)]
android: Get a warning on use of deprecated features

6 years agoandroid: Replace use of deprecate getColor() method overload
Tobias Brunner [Thu, 26 Nov 2015 17:07:23 +0000 (18:07 +0100)]
android: Replace use of deprecate getColor() method overload

6 years agoandroid: Make font in log view monospace again on Android 5+
Tobias Brunner [Thu, 26 Nov 2015 15:46:54 +0000 (16:46 +0100)]
android: Make font in log view monospace again on Android 5+

6 years agoandroid: Avoid deprecated tabs in the ActionBar in TrustedCertificatesActivity
Tobias Brunner [Thu, 26 Nov 2015 15:44:46 +0000 (16:44 +0100)]
android: Avoid deprecated tabs in the ActionBar in TrustedCertificatesActivity

Instead we use TabLayout and ViewPager from the support libraries.

6 years agoandroid: Automatically reload certificates if manager is reset
Tobias Brunner [Thu, 26 Nov 2015 15:33:08 +0000 (16:33 +0100)]
android: Automatically reload certificates if manager is reset

No need to manually reset the fragments anymore.

6 years agoandroid: Make TrustedCertificateManager an Observable
Tobias Brunner [Thu, 26 Nov 2015 15:22:43 +0000 (16:22 +0100)]
android: Make TrustedCertificateManager an Observable

Observers are notified when the manager is reset (and initially when the
certificates are first loaded).

6 years agoandroid: Switch to AppCompat/Material theme for dialogs
Tobias Brunner [Fri, 15 Apr 2016 15:36:31 +0000 (17:36 +0200)]
android: Switch to AppCompat/Material theme for dialogs

There is no AppCompatProgressDialog class as the use of ProgressDialog
is discouraged (instead progress bars should be placed in the layout directly).
To display the current ProgressDialog instances correctly on systems < 21 we
modify the window background color.

6 years agoandroid: Switch to AppCompat/Material theme and use custom Toolbar as AppBar
Tobias Brunner [Wed, 25 Nov 2015 16:05:56 +0000 (17:05 +0100)]
android: Switch to AppCompat/Material theme and use custom Toolbar as AppBar

Also includes some whitespace/formatting changes due to the switch to
Android Studio.

6 years agoandroid: Ignore build/ in project directory
Tobias Brunner [Fri, 15 Apr 2016 15:43:58 +0000 (17:43 +0200)]
android: Ignore build/ in project directory

6 years agoandroid: Update platform tools and pull in support libs
Tobias Brunner [Wed, 25 Nov 2015 15:07:55 +0000 (16:07 +0100)]
android: Update platform tools and pull in support libs

We'll have to change some stuff that Google deprecated (e.g. the tabs in
the ActionBar) and that requires changing the theme at least in activities.
Since that would look a bit inconsistent we'll change it globally and
use parts of the support library.

6 years agoandroid: Update Android Gradle plugin and wrapper
Tobias Brunner [Tue, 12 Apr 2016 15:10:11 +0000 (17:10 +0200)]
android: Update Android Gradle plugin and wrapper

6 years agotesting: Use absolute path of imv_policy_manager
Andreas Steffen [Tue, 26 Apr 2016 15:15:25 +0000 (17:15 +0200)]
testing: Use absolute path of imv_policy_manager

6 years agoUpdated products in IMV database
Andreas Steffen [Tue, 26 Apr 2016 15:13:49 +0000 (17:13 +0200)]
Updated products in IMV database

6 years agoswanctl: list EAP type in --list-conns
Andreas Steffen [Tue, 26 Apr 2016 15:13:20 +0000 (17:13 +0200)]
swanctl: list EAP type in --list-conns

6 years agotesting: -D and -u options in sfdisk are not supported any more
Andreas Steffen [Mon, 25 Apr 2016 17:31:12 +0000 (19:31 +0200)]
testing: -D and -u options in sfdisk are not supported any more

6 years agoidentification: Add support for dmdName RDN (
Yannick Cann [Mon, 25 Apr 2016 08:39:41 +0000 (10:39 +0200)]
identification: Add support for dmdName RDN (

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.

6 years agoleak-detective: added _IO_file_doallocate to whitelist
Andreas Steffen [Sun, 24 Apr 2016 21:34:44 +0000 (23:34 +0200)]
leak-detective: added _IO_file_doallocate to whitelist

6 years agoswanctl: log errors to stderr
Andreas Steffen [Sun, 24 Apr 2016 21:33:23 +0000 (23:33 +0200)]
swanctl: log errors to stderr

6 years agotesting: updated testing.conf
Andreas Steffen [Sun, 24 Apr 2016 11:36:22 +0000 (13:36 +0200)]
testing: updated testing.conf

6 years agopool: Use correct name to remove index for CHILD_SA TS in SQLite script
Tobias Brunner [Mon, 18 Apr 2016 08:07:15 +0000 (10:07 +0200)]
pool: Use correct name to remove index for CHILD_SA TS in SQLite script

Fixes #1415.

6 years agokernel-pfkey: Add support for manual priorities
Tobias Brunner [Wed, 6 Apr 2016 13:17:06 +0000 (15:17 +0200)]
kernel-pfkey: Add support for manual priorities

Also orders policies with equals priorities by their automatic priority.

6 years agokernel-pfkey: Update priority calculation formula to the new one in kernel-netlink
Tobias Brunner [Mon, 11 Apr 2016 09:19:26 +0000 (11:19 +0200)]
kernel-pfkey: Update priority calculation formula to the new one in kernel-netlink

Since the selectors are not exactly the same (no port masks, no interface)
some small tweaks have been applied.

6 years agokernel-netlink: Order policies with equal priorities by their automatic priority
Tobias Brunner [Wed, 6 Apr 2016 12:40:28 +0000 (14:40 +0200)]
kernel-netlink: Order policies with equal priorities by their automatic priority

This allows using manual priorities for traps, which have a lower
base priority than the resulting IPsec policies.  This could otherwise
be problematic if, for example, swanctl --install/uninstall is used while
an SA is established combined with e.g. IPComp, where the trap policy does
not look the same as the IPsec policy (which is now otherwise often the case
as the reqids stay the same).

It also orders policies by selector size if manual priorities are configured
and narrowing occurs.

6 years agoMerge branch 'boringssl'
Tobias Brunner [Fri, 15 Apr 2016 08:33:23 +0000 (10:33 +0200)]
Merge branch 'boringssl'

Adds some fixes to the openssl plugin to build against BoringSSL.

Fixes #1374.

6 years agocurl: Add TLS support if libcurl is built against BoringSSL
Tobias Brunner [Mon, 11 Apr 2016 09:33:41 +0000 (11:33 +0200)]
curl: Add TLS support if libcurl is built against BoringSSL

We don't have to rely on the openssl plugin and its threading
initialization as BoringSSL is thread-safe out of the box.

6 years agoopenssl: BoringSSL does not support configuration
Tobias Brunner [Fri, 8 Apr 2016 13:56:25 +0000 (15:56 +0200)]
openssl: BoringSSL does not support configuration

The other initialization functions are still defined but many are
apparently no-ops (this is also true for the threading initialization).

6 years agoopenssl: The member storing the DH exponent length has been renamed in BoringSSL
Tobias Brunner [Fri, 8 Apr 2016 13:55:05 +0000 (15:55 +0200)]
openssl: The member storing the DH exponent length has been renamed in BoringSSL

6 years agoopenssl: Use proper EVP macro to determine size of a hash
Tobias Brunner [Fri, 8 Apr 2016 13:54:08 +0000 (15:54 +0200)]
openssl: Use proper EVP macro to determine size of a hash