summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/ConfigParser.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-16 04:29:35 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-16 04:29:35 +0200
commit1a20bf712119d2a336ba9daa3abbc416a23a81d7 (patch)
tree55412f3d8e07f4ae102d82f2b425e2a2e9627926 /src/de/blinkt/openvpn/ConfigParser.java
parentcb18cf6c0aed926eaad59025efd446a270aea57e (diff)
Fixes error reported on the Android market consolev0.5.12a
- setting 0.0.0.0 as DNS gives NP - Using a invalid keystone key gives a NP in rsa_sign (Seems to happen on 4.0 -> 4.1 upgrade) - stupid config converter bug introduced in 5.12 - bump version to 5.12a
Diffstat (limited to 'src/de/blinkt/openvpn/ConfigParser.java')
-rw-r--r--src/de/blinkt/openvpn/ConfigParser.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java
index e1b426fa..f9eac745 100644
--- a/src/de/blinkt/openvpn/ConfigParser.java
+++ b/src/de/blinkt/openvpn/ConfigParser.java
@@ -282,18 +282,20 @@ public class ConfigParser {
// Also recognize tls-auth [inline] direction ...
Vector<Vector<String>> tlsauthoptions = getAllOption("tls-auth", 1, 2);
- for(Vector<String> tlsauth:tlsauthoptions) {
- if(tlsauth!=null)
- {
- if(!tlsauth.get(1).equals("[inline]")) {
- np.mTLSAuthFilename=tlsauth.get(1);
- np.mUseTLSAuth=true;
+ if(tlsauthoptions!=null) {
+ for(Vector<String> tlsauth:tlsauthoptions) {
+ if(tlsauth!=null)
+ {
+ if(!tlsauth.get(1).equals("[inline]")) {
+ np.mTLSAuthFilename=tlsauth.get(1);
+ np.mUseTLSAuth=true;
+ }
+ if(tlsauth.size()==3)
+ np.mTLSAuthDirection=tlsauth.get(2);
}
- if(tlsauth.size()==3)
- np.mTLSAuthDirection=tlsauth.get(2);
}
}
-
+
Vector<String> direction = getOption("key-direction", 1, 1);
if(direction!=null)
np.mTLSAuthDirection=direction.get(1);