summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-05-05 03:08:32 +0200
committerArne Schwabe <arne@rfc2549.org>2012-05-05 03:08:32 +0200
commit21f0e327e0f23b0e76c420d73298dc911408ef96 (patch)
treea08973965af87fac0227171668688df1f88ab5af /src/de/blinkt/openvpn
parent1c6052df6172f8f4e025fa0934abe58aab640430 (diff)
Error message if keystore cannot be accessed (e.g. after backup)
Diffstat (limited to 'src/de/blinkt/openvpn')
-rw-r--r--src/de/blinkt/openvpn/OpenVPN.java2
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java20
2 files changed, 11 insertions, 11 deletions
diff --git a/src/de/blinkt/openvpn/OpenVPN.java b/src/de/blinkt/openvpn/OpenVPN.java
index a5f60daf..3e660bce 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 f6ece687..572c0c2d 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() {