From 6b3e6cd5f45c6e8421540af6691637f3ac54c9a4 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 17 Dec 2016 13:20:00 +0100 Subject: Fix pkcs12 profiles not working --- main/src/main/java/de/blinkt/openvpn/VpnProfile.java | 2 +- main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java index 38ecb73f..9147701c 100644 --- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -869,7 +869,7 @@ public class VpnProfile implements Serializable, Cloneable { if (mAuthenticationType == TYPE_KEYSTORE || mAuthenticationType == TYPE_USERPASS_KEYSTORE) { if (mAlias == null) return R.string.no_keystore_cert_selected; - } else { + } else if (mAuthenticationType == TYPE_CERTIFICATES || mAuthenticationType == TYPE_USERPASS_CERTIFICATES){ if (TextUtils.isEmpty(mCaFilename)) return R.string.no_ca_cert_selected; } diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java index c2a943e9..3d3dd6b1 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java @@ -7,6 +7,7 @@ package de.blinkt.openvpn.core; import android.app.Service; import android.content.Intent; +import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Message; @@ -100,7 +101,10 @@ public class OpenVPNStatusService extends Service implements VpnStatus.LogListen return pipe[0]; } catch (IOException e) { e.printStackTrace(); - throw new RemoteException(e.getMessage()); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { + throw new RemoteException(e.getMessage()); + } + return null; } } -- cgit v1.2.3