diff options
-rw-r--r-- | res/values/strings.xml | 3 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/OpenVPN.java | 2 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/VpnProfile.java | 20 |
3 files changed, 13 insertions, 12 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index cf8cc5c..e3d54a8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -165,5 +165,6 @@ <string name="routes_info">Routes: %s</string> <string name="ip_not_cidr">Cannot make sense of %1$s and %2$s as local IP with CIDR netmask, assuming second address is peer address of remote. Using /32 netmask for local IP.</string> <string name="route_not_cidr">Cannot make sense of %1$s and %2$s as IP route with CIDR netmask, using /32 as netmask.</string> - <string name="route_not_netip">Corrected route %1$s/%2$s to %3$s/%2$s</string> + <string name="route_not_netip">Corrected route %1$s/%2$s to %3$s/%2$s</string> + <string name="keychain_access">Cannot accces the Android Keychain Certificates. If you restored a backup of the app reselect the certificate</string> </resources> diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java index a5f60da..3e660bc 100644 --- a/src/de/blinkt/openvpn/OpenVPN.java +++ b/src/de/blinkt/openvpn/OpenVPN.java @@ -17,7 +17,7 @@ public class OpenVPN { private static int counter=0; private static Vector<LogListener> logListener=new Vector<OpenVPN.LogListener>(); - private static String[] mBconfig=null; + private static String[] mBconfig; public interface LogListener { void newLog(String logmessage); diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index f6ece68..572c0c2 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -38,10 +38,10 @@ public class VpnProfile implements Serializable{ public static final int TYPE_USERPASS_CERTIFICATES = 5; public static final int TYPE_USERPASS_PKCS12 = 6; public static final int TYPE_USERPASS_KEYSTORE = 7; - - - - + + + + private static final String OVPNCONFIGFILE = "android.conf"; @@ -186,7 +186,7 @@ public class VpnProfile implements Serializable{ cfg+="tmp-dir "; cfg+=cacheDir.getAbsolutePath(); cfg+="\n\n"; - + boolean useTLSClient = (mAuthenticationType != TYPE_STATICKEYS); if(useTLSClient && mUsePull) @@ -455,8 +455,6 @@ public class VpnProfile implements Serializable{ ks.store(fout,mypw.toCharArray()); fout.flush(); fout.close(); return; - } catch (KeyChainException e) { - e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } catch (KeyStoreException e) { @@ -469,6 +467,8 @@ public class VpnProfile implements Serializable{ e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); + } catch (KeyChainException e) { + OpenVPN.logMessage(0,"",context.getString(R.string.keychain_access)); } } @@ -538,7 +538,7 @@ public class VpnProfile implements Serializable{ if(isUserPWAuth() && (mPassword.equals("") || mPassword == null)) { if(mTransientPW==null) return "Password"; - + } return null; } @@ -552,8 +552,8 @@ public class VpnProfile implements Serializable{ return mPassword; } } - - + + // Used by the Array Adapter @Override public String toString() { |