9 years agoadded deletion of product/file entries to usage
Andreas Steffen [Thu, 16 Aug 2012 07:14:13 +0000 (09:14 +0200)]
added deletion of product/file entries to usage

9 years agoNew Android release after adding error dialog
Tobias Brunner [Wed, 15 Aug 2012 08:54:22 +0000 (10:54 +0200)]
New Android release after adding error dialog

Skipped one version due to a rebasing mishap.

9 years agoShow an error message if VPN is not supported
Tobias Brunner [Wed, 15 Aug 2012 08:51:30 +0000 (10:51 +0200)]
Show an error message if VPN is not supported

Some devices have Android 4 installed but the system images still seem to
lack the components that are required for VPN support. One such
component is the dialog used to grant permission to create .

9 years agoEnable search for certificate lists (via SearchView in ActionBar)
Tobias Brunner [Tue, 14 Aug 2012 09:50:03 +0000 (11:50 +0200)]
Enable search for certificate lists (via SearchView in ActionBar)

9 years agoAdded new UI to select a specific CA certificate
Tobias Brunner [Tue, 14 Aug 2012 09:47:32 +0000 (11:47 +0200)]
Added new UI to select a specific CA certificate

With this change there is no need to wait for all certificates being loaded
anymore (this happens only when the user opens the selection activity).

9 years agoDon't try to save profile ID if there is none
Tobias Brunner [Tue, 14 Aug 2012 09:31:37 +0000 (11:31 +0200)]
Don't try to save profile ID if there is none

9 years agoList fragment for trusted certificates can notify listeners about clicks
Tobias Brunner [Tue, 14 Aug 2012 08:43:03 +0000 (10:43 +0200)]
List fragment for trusted certificates can notify listeners about clicks

9 years agoAdded an activity that shows lists of CA certificates in two tabs
Tobias Brunner [Tue, 14 Aug 2012 08:10:52 +0000 (10:10 +0200)]
Added an activity that shows lists of CA certificates in two tabs

9 years agoAdded a ListFragment that lists trusted certificates (loaded via a custom Loader)
Tobias Brunner [Tue, 14 Aug 2012 07:36:56 +0000 (09:36 +0200)]
Added a ListFragment that lists trusted certificates (loaded via a custom Loader)

9 years agoChanged TrustedCertificateAdapter for use with ListViews and TrustedCertificateEntry
Tobias Brunner [Tue, 14 Aug 2012 07:15:02 +0000 (09:15 +0200)]
Changed TrustedCertificateAdapter for use with ListViews and TrustedCertificateEntry

9 years agoRemove certificate spinner from edit view
Tobias Brunner [Tue, 14 Aug 2012 07:12:29 +0000 (09:12 +0200)]
Remove certificate spinner from edit view

9 years agoFunction to get only system-wide CA certificates added to TrustedCertificateManager
Tobias Brunner [Mon, 13 Aug 2012 16:43:29 +0000 (18:43 +0200)]
Function to get only system-wide CA certificates added to TrustedCertificateManager

9 years agoAdded class to store trusted certificate entries for lists
Tobias Brunner [Mon, 13 Aug 2012 16:41:34 +0000 (18:41 +0200)]
Added class to store trusted certificate entries for lists

9 years agofixed Makefile for libstrongswan dev headers
Andreas Steffen [Tue, 14 Aug 2012 08:21:28 +0000 (10:21 +0200)]
fixed Makefile for libstrongswan dev headers

9 years agoversion bump to 5.0.1dr2
Andreas Steffen [Tue, 14 Aug 2012 08:00:46 +0000 (10:00 +0200)]
version bump to 5.0.1dr2

9 years agoskip boot aggregate check against database
Andreas Steffen [Tue, 14 Aug 2012 08:00:05 +0000 (10:00 +0200)]
skip boot aggregate check against database

9 years agoValidate netmask in mem_pool_create
Tobias Brunner [Mon, 13 Aug 2012 11:54:28 +0000 (13:54 +0200)]
Validate netmask in mem_pool_create

9 years agoValidate netmask in traffic_selector_create_from_subnet
Tobias Brunner [Mon, 13 Aug 2012 10:57:41 +0000 (12:57 +0200)]
Validate netmask in traffic_selector_create_from_subnet

Fixes #216.

9 years agoComment fixed
Tobias Brunner [Mon, 13 Aug 2012 11:16:45 +0000 (13:16 +0200)]
Comment fixed

9 years agoMerge branch 'android-app'
Tobias Brunner [Mon, 13 Aug 2012 10:07:52 +0000 (12:07 +0200)]
Merge branch 'android-app'

This branch introduces a userland IPsec implementation (libipsec) and an
Android App which targets the VpnService API that is provided by Android 4+.

The implementation is based on the bachelor thesis 'Userland IPsec for
Android 4' by Giuliano Grassi and Ralf Sager.

9 years agoEnsure thread IDs always start with 1 even if the library is reused
Tobias Brunner [Sat, 11 Aug 2012 15:30:39 +0000 (17:30 +0200)]
Ensure thread IDs always start with 1 even if the library is reused

Within the Android App the library stays loaded in memory and is just
initialized/deinitialized with each connection, the static thread
counter would continuously increase without this patch.

9 years agoAdded a button to the error dialog that allows to view the log file
Tobias Brunner [Sat, 11 Aug 2012 14:16:45 +0000 (16:16 +0200)]
Added a button to the error dialog that allows to view the log file

9 years agoUse major.minor.revision version numbers for Android application
Tobias Brunner [Fri, 10 Aug 2012 14:46:09 +0000 (16:46 +0200)]
Use major.minor.revision version numbers for Android application

9 years agoOnly allow access to log file via explicitly created URIs
Tobias Brunner [Fri, 10 Aug 2012 14:42:49 +0000 (16:42 +0200)]
Only allow access to log file via explicitly created URIs

Since ContentProviders are public and permissions don't seem to work any
other application could access the log file.  With this token system
only URIs we explicitly created can be accessed.

9 years agoMenu option added that allows users to send the log file
Tobias Brunner [Fri, 10 Aug 2012 14:37:39 +0000 (16:37 +0200)]
Menu option added that allows users to send the log file

9 years agoAdd ContentProvider to access log file from other applications
Tobias Brunner [Fri, 10 Aug 2012 14:33:05 +0000 (16:33 +0200)]
Add ContentProvider to access log file from other applications

9 years agoWatch for changes to the log file so we can reopen it
Tobias Brunner [Fri, 10 Aug 2012 08:05:38 +0000 (10:05 +0200)]
Watch for changes to the log file so we can reopen it

If the log fragment is shown while the daemon starts (which is not the
case at the moment, but maybe later on tablets) the file reader would not
notice that the file got truncated.  The same applies if the file is deleted
directly on the file system e.g. with adb shell.

9 years agoAdd an Activity that shows the log fragment
Tobias Brunner [Fri, 10 Aug 2012 07:58:56 +0000 (09:58 +0200)]
Add an Activity that shows the log fragment

9 years agoAdd a fragment that can display charon's log file
Tobias Brunner [Fri, 10 Aug 2012 07:50:52 +0000 (09:50 +0200)]
Add a fragment that can display charon's log file

It continuously reads from the log file in a separate thread while displayed.

9 years agoAdded special ScrollView with auto-scrolling feature
Tobias Brunner [Fri, 10 Aug 2012 07:37:20 +0000 (09:37 +0200)]
Added special ScrollView with auto-scrolling feature

The ability to auto-scroll is disabled as soon as the user manually
scrolls around and re-enable when the user scrolls to the bottom.

9 years agoCharon logs to a file in the App's data directory
Tobias Brunner [Fri, 10 Aug 2012 07:06:49 +0000 (09:06 +0200)]
Charon logs to a file in the App's data directory

9 years agoMoved Java to C string conversion function to android_jni header file
Tobias Brunner [Thu, 9 Aug 2012 14:38:19 +0000 (16:38 +0200)]
Moved Java to C string conversion function to android_jni header file

9 years agoLog charon version and uname() output, split libcharon and charon initialization
Tobias Brunner [Thu, 9 Aug 2012 14:36:48 +0000 (16:36 +0200)]
Log charon version and uname() output, split libcharon and charon initialization

9 years agoOnly call disconnect() from CharonVpnService if we are not already disconnecting
Tobias Brunner [Thu, 9 Aug 2012 14:03:14 +0000 (16:03 +0200)]
Only call disconnect() from CharonVpnService if we are not already disconnecting

9 years agoLoad single certificates directly from the KeyStore if we cannot get the read lock
Tobias Brunner [Thu, 9 Aug 2012 14:00:35 +0000 (16:00 +0200)]
Load single certificates directly from the KeyStore if we cannot get the read lock

This helps when running in the emulator as loading the certificates
takes quite a while there.  This way a configured CA certificates is loaded
directly without having to wait for all certificates being cached.

9 years agoUse colors from the Android color palette for the VPN status texts
Tobias Brunner [Thu, 9 Aug 2012 13:01:19 +0000 (15:01 +0200)]
Use colors from the Android color palette for the VPN status texts

9 years agoLocalized title for contextual action bar
Tobias Brunner [Thu, 9 Aug 2012 10:26:48 +0000 (12:26 +0200)]
Localized title for contextual action bar

9 years agoGerman translation added
Tobias Brunner [Thu, 9 Aug 2012 09:53:55 +0000 (11:53 +0200)]
German translation added

9 years agoShow MainActiviy if the user clicks 'Configure' in Android's VPN dialog
Tobias Brunner [Thu, 9 Aug 2012 09:38:18 +0000 (11:38 +0200)]
Show MainActiviy if the user clicks 'Configure' in Android's VPN dialog

9 years agoKeep reporting the error until the user dismisses it
Tobias Brunner [Thu, 9 Aug 2012 09:35:24 +0000 (11:35 +0200)]
Keep reporting the error until the user dismisses it

Even when the Activity is closed and later reopened.

9 years agoShow an error dialog when errors occur while establishing the VPN
Tobias Brunner [Thu, 9 Aug 2012 09:33:22 +0000 (11:33 +0200)]
Show an error dialog when errors occur while establishing the VPN

9 years agoShow a button to disconnect the VPN once it is established
Tobias Brunner [Thu, 9 Aug 2012 09:27:34 +0000 (11:27 +0200)]
Show a button to disconnect the VPN once it is established

9 years agoShow current VPN state and profile name
Tobias Brunner [Thu, 9 Aug 2012 09:22:12 +0000 (11:22 +0200)]
Show current VPN state and profile name

Show modal dialogs while connecting and disconnecting the VPN.

9 years agoAdd a fragment to MainActivity which will display the current VPN state
Tobias Brunner [Thu, 9 Aug 2012 09:11:32 +0000 (11:11 +0200)]
Add a fragment to MainActivity which will display the current VPN state

The fragment is bound to the VpnStateService and registered as listener.

9 years agoUse a separate (volatile) variable for certificate alias
Tobias Brunner [Wed, 8 Aug 2012 17:10:33 +0000 (19:10 +0200)]
Use a separate (volatile) variable for certificate alias

If a connection is started while certificates are still loading and the
initiation is then canceled a deadlock could result if the daemon is
trying to enumerate the certificates just then.

9 years agoDon't set the source address on Android
Tobias Brunner [Wed, 8 Aug 2012 13:50:36 +0000 (15:50 +0200)]
Don't set the source address on Android

9 years agoClose IKE_SA on Android immediately if setting up CHILD_SA fails
Tobias Brunner [Wed, 8 Aug 2012 13:03:00 +0000 (15:03 +0200)]
Close IKE_SA on Android immediately if setting up CHILD_SA fails

9 years agoReduce number of retransmits on Android
Tobias Brunner [Wed, 8 Aug 2012 13:02:34 +0000 (15:02 +0200)]
Reduce number of retransmits on Android

9 years agoJob added which handles plain text packets read from TUN device
Tobias Brunner [Wed, 8 Aug 2012 12:54:44 +0000 (14:54 +0200)]
Job added which handles plain text packets read from TUN device

9 years agoAdded a handler that writes inbound plain text packets to the TUN device
Tobias Brunner [Wed, 8 Aug 2012 12:51:59 +0000 (14:51 +0200)]
Added a handler that writes inbound plain text packets to the TUN device

9 years agoAdd simple callbacks to receive/send ESP packets via libipsec/receiver.
Tobias Brunner [Wed, 8 Aug 2012 12:49:52 +0000 (14:49 +0200)]
Add simple callbacks to receive/send ESP packets via libipsec/receiver.

9 years agoAdd routes based on the installed IPsec policies to the TUN device builder
Tobias Brunner [Wed, 8 Aug 2012 12:47:47 +0000 (14:47 +0200)]
Add routes based on the installed IPsec policies to the TUN device builder

9 years agoAdd virtual IP to the TUN device builder
Tobias Brunner [Wed, 8 Aug 2012 12:46:22 +0000 (14:46 +0200)]
Add virtual IP to the TUN device builder

After the CHILD_SA is established we can easily get this address from
the IKE_SA.

9 years agoCreate a TUN device via VpnService.Builder once the CHILD_SA is established
Tobias Brunner [Wed, 8 Aug 2012 12:43:39 +0000 (14:43 +0200)]
Create a TUN device via VpnService.Builder once the CHILD_SA is established

9 years agoAn Android specific attribute handler installs DNS servers via Builder
Tobias Brunner [Wed, 8 Aug 2012 12:04:14 +0000 (14:04 +0200)]
An Android specific attribute handler installs DNS servers via Builder

9 years agoNative counterpart of VpnService.Builder added, exposed by charonservice
Tobias Brunner [Wed, 8 Aug 2012 11:48:54 +0000 (13:48 +0200)]
Native counterpart of VpnService.Builder added, exposed by charonservice

9 years agoAdapter class added around VpnService.Builder which allows to access it via JNI
Tobias Brunner [Wed, 8 Aug 2012 11:45:49 +0000 (13:45 +0200)]
Adapter class added around VpnService.Builder which allows to access it via JNI

9 years agoDon't print hosts as %any if %+H is used
Tobias Brunner [Wed, 8 Aug 2012 12:06:59 +0000 (14:06 +0200)]
Don't print hosts as %any if %+H is used

That is, the plus sign can be used in the format string to force a numeric
string representation of all host_t objects even and :: which
would otherwise be printed as %any and %any6.

9 years agoAdd support for '+' in custom format specifiers
Tobias Brunner [Wed, 8 Aug 2012 12:05:58 +0000 (14:05 +0200)]
Add support for '+' in custom format specifiers

9 years agoInitiate an SA via native JNI method
Tobias Brunner [Wed, 8 Aug 2012 11:23:41 +0000 (13:23 +0200)]
Initiate an SA via native JNI method

9 years agoHelper function added that retrieves a local IP address
Tobias Brunner [Wed, 8 Aug 2012 11:20:34 +0000 (13:20 +0200)]
Helper function added that retrieves a local IP address

9 years agoandroid_service_t handles initiation of an SA and tracks its progress
Tobias Brunner [Wed, 8 Aug 2012 11:15:53 +0000 (13:15 +0200)]
android_service_t handles initiation of an SA and tracks its progress

Status updates are delivered via charonservice (JNI).

9 years agoAndroid specific credential set also provides user credentials
Tobias Brunner [Wed, 8 Aug 2012 10:59:39 +0000 (12:59 +0200)]
Android specific credential set also provides user credentials

9 years agoAdded an Android specific credential set that provides CA certificates via JNI
Tobias Brunner [Wed, 8 Aug 2012 10:52:05 +0000 (12:52 +0200)]
Added an Android specific credential set that provides CA certificates via JNI

9 years agoCharonVpnService provides a function to get trusted certificates via JNI
Tobias Brunner [Wed, 8 Aug 2012 10:35:49 +0000 (12:35 +0200)]
CharonVpnService provides a function to get trusted certificates via JNI

9 years agoFunction added that allows to update VPN state via JNI
Tobias Brunner [Wed, 8 Aug 2012 10:31:58 +0000 (12:31 +0200)]
Function added that allows to update VPN state via JNI

9 years agoAdd a function to disconnect any current VPN connection
Tobias Brunner [Wed, 8 Aug 2012 10:25:17 +0000 (12:25 +0200)]
Add a function to disconnect any current VPN connection

9 years agoImplement kernel_ipsec_t.bypass_socket() via JNI and VpnService.protect()
Tobias Brunner [Wed, 8 Aug 2012 10:20:13 +0000 (12:20 +0200)]
Implement kernel_ipsec_t.bypass_socket() via JNI and VpnService.protect()

9 years agoCharonVpnService binds to VpnStateService and does basic state updates
Tobias Brunner [Wed, 8 Aug 2012 10:04:38 +0000 (12:04 +0200)]
CharonVpnService binds to VpnStateService and does basic state updates

9 years agoCharonVpnService reacts on Intents and properly inits/deinits charon
Tobias Brunner [Wed, 8 Aug 2012 09:54:36 +0000 (11:54 +0200)]
CharonVpnService reacts on Intents and properly inits/deinits charon

Charon is initialized with every new connection attempt and
deinitialized when the service is terminated or it receives an empty
Intent (or before starting a new connection).

A separate thread is used to handle the connection attempts, this thread
acts as main thread for charon.

9 years agoService added that keeps track of VPN state and notifies listeners about changes
Tobias Brunner [Wed, 8 Aug 2012 09:32:03 +0000 (11:32 +0200)]
Service added that keeps track of VPN state and notifies listeners about changes

It is ensured that listeners are notified only from the main thread.

9 years agoAdd an Android specific kernel_ipsec_t implementation
Tobias Brunner [Wed, 8 Aug 2012 09:12:55 +0000 (11:12 +0200)]
Add an Android specific kernel_ipsec_t implementation

This is pretty much a proxy class that delegates everything (that is
currently supported) to libipsec.

9 years agoAdd an Android specific kernel_net_t implementation
Tobias Brunner [Wed, 8 Aug 2012 09:05:07 +0000 (11:05 +0200)]
Add an Android specific kernel_net_t implementation

This currently provides only no-ops and is just added because a
kernel-net implementation is required and kernel-netlink can't be used
at the moment.

9 years agoClone the current VPN profile before updating the password
Tobias Brunner [Tue, 7 Aug 2012 16:45:03 +0000 (18:45 +0200)]
Clone the current VPN profile before updating the password

Storing the password on the original object would be problematic in case
the user mistypes the password (no prompt would be shown the second time).

An alternative would be to just return the ID of the selected profile
and then fetch it from the database.

9 years agoAllow VpnProfile objects to be cloned
Tobias Brunner [Tue, 7 Aug 2012 16:44:36 +0000 (18:44 +0200)]
Allow VpnProfile objects to be cloned

9 years agoPrompt the user for a password if none is configured in the VPN profile
Tobias Brunner [Tue, 7 Aug 2012 16:44:06 +0000 (18:44 +0200)]
Prompt the user for a password if none is configured in the VPN profile

9 years agoAllow selection of a CA certificate for a VPN profile
Tobias Brunner [Tue, 7 Aug 2012 16:03:51 +0000 (18:03 +0200)]
Allow selection of a CA certificate for a VPN profile

This solution is just temporary as it really is not that user-friendly
to select CA certificates with a Spinner widget.

9 years agoSimplified asynchronous loading of CA certificates in MainActivity
Tobias Brunner [Tue, 7 Aug 2012 15:52:10 +0000 (17:52 +0200)]
Simplified asynchronous loading of CA certificates in MainActivity

9 years agoAdded simple adapter for trusted certificates (to be used with a Spinner widget)
Tobias Brunner [Tue, 7 Aug 2012 15:07:44 +0000 (17:07 +0200)]
Added simple adapter for trusted certificates (to be used with a Spinner widget)

9 years agoKeep a global reference to the CharonVpnService object in charonservice
Tobias Brunner [Tue, 7 Aug 2012 13:51:00 +0000 (15:51 +0200)]
Keep a global reference to the CharonVpnService object in charonservice

9 years agoAdd signal handler for fatal signals to libandroidbridge
Tobias Brunner [Tue, 7 Aug 2012 13:30:49 +0000 (15:30 +0200)]
Add signal handler for fatal signals to libandroidbridge

9 years agoSet default log level in libandroidbridge
Tobias Brunner [Tue, 7 Aug 2012 13:25:06 +0000 (15:25 +0200)]
Set default log level in libandroidbridge

9 years agoRenamed main Activity (shorter name in Launcher)
Tobias Brunner [Tue, 7 Aug 2012 13:17:45 +0000 (15:17 +0200)]
Renamed main Activity (shorter name in Launcher)

9 years agoMainActivity starts CharonVpnService if a VpnProfile is clicked in the list
Tobias Brunner [Tue, 7 Aug 2012 12:11:27 +0000 (14:11 +0200)]
MainActivity starts CharonVpnService if a VpnProfile is clicked in the list

This is done by implementing the OnVpnProfileSelectedListener interface
provided by VpnProfileListFragment.

9 years agoMenu option added to reload cached CA certificates
Tobias Brunner [Tue, 7 Aug 2012 12:02:38 +0000 (14:02 +0200)]
Menu option added to reload cached CA certificates

This might be required if the user installs a new CA certificate.

9 years agoShow progress bar in ActionBar while loading cached CA certificates
Tobias Brunner [Tue, 7 Aug 2012 12:00:16 +0000 (14:00 +0200)]
Show progress bar in ActionBar while loading cached CA certificates

9 years agoHelper function added to handle Java exceptions in native code
Tobias Brunner [Tue, 7 Aug 2012 11:40:47 +0000 (13:40 +0200)]
Helper function added to handle Java exceptions in native code

9 years agoDon't attach to actual Java threads (or already attached ones)
Tobias Brunner [Tue, 7 Aug 2012 11:34:44 +0000 (13:34 +0200)]
Don't attach to actual Java threads (or already attached ones)

We check this by trying to retrieve a JNIEnv object from the JVM,
if one is returned the current thread is not native (created from Java)
or the thread is already attached.

9 years agoInitially load CA certificates when the main Activity is created
Tobias Brunner [Wed, 18 Jul 2012 11:43:34 +0000 (13:43 +0200)]
Initially load CA certificates when the main Activity is created

9 years agoTrusted CA certificates are loaded and cached by a static singleton
Tobias Brunner [Wed, 18 Jul 2012 11:40:29 +0000 (13:40 +0200)]
Trusted CA certificates are loaded and cached by a static singleton

9 years agoRemove restriction to portrait orientation
Tobias Brunner [Tue, 17 Jul 2012 18:03:40 +0000 (20:03 +0200)]
Remove restriction to portrait orientation

9 years agoUse Holo as theme
Tobias Brunner [Tue, 17 Jul 2012 18:03:23 +0000 (20:03 +0200)]
Use Holo as theme

9 years agoMake click events on the profile list available to the Activity
Tobias Brunner [Tue, 17 Jul 2012 17:57:51 +0000 (19:57 +0200)]
Make click events on the profile list available to the Activity

If the Activity this fragment is placed in implements the provided interface
it is notified about clicks on any of the profiles.

9 years agoMerge branch 'android-ndk'
Tobias Brunner [Mon, 13 Aug 2012 08:39:34 +0000 (10:39 +0200)]
Merge branch 'android-ndk'

This branch comes with some preliminary changes for the user-land IPsec
implementation and the Android App.

One important change is that the UDP ports used by the socket-default plugin
were made configurable (either via ./configure or strongswan.conf).
Also, the plugin does randomly allocate a port if it is configured to 0,
which is useful for client implementations.  A consequence of these
changes is that the local UDP port used when creating ike_cfg_t objects has
to be fetched from the socket.

9 years agoDoxygen fix
Tobias Brunner [Sat, 11 Aug 2012 14:50:22 +0000 (16:50 +0200)]
Doxygen fix

9 years agoAvoid problems with Doxygen by adding warn_unused_result attribute at the end of...
Tobias Brunner [Sat, 11 Aug 2012 14:48:09 +0000 (16:48 +0200)]
Avoid problems with Doxygen by adding warn_unused_result attribute at the end of method signatures

9 years agoAdd warn_unused_result attributes to rng_(get|allocate)_bytes_not_zero
Tobias Brunner [Sat, 11 Aug 2012 14:22:03 +0000 (16:22 +0200)]
Add warn_unused_result attributes to rng_(get|allocate)_bytes_not_zero

Also fixed Doxygen comments.

9 years agoDocumentation fixes regarding xauth-pam/eap-gtc plugins
Tobias Brunner [Sat, 11 Aug 2012 14:05:05 +0000 (16:05 +0200)]
Documentation fixes regarding xauth-pam/eap-gtc plugins

9 years agoUse a contextual action bar to edit and delete selected VPN profiles
Tobias Brunner [Tue, 17 Jul 2012 17:49:42 +0000 (19:49 +0200)]
Use a contextual action bar to edit and delete selected VPN profiles

9 years agoProvide a menu with options to save VPN profiles
Tobias Brunner [Tue, 17 Jul 2012 17:45:23 +0000 (19:45 +0200)]
Provide a menu with options to save VPN profiles

The ID of the updated/inserted profile is sent back to the activity that
started the detail view.