summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/ConfigParser.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-02 21:42:07 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-02 21:42:07 +0200
commit106b2ec64486b32008471a6c81e1f43111e4cf49 (patch)
tree2a6a23da5bd535c23b2289b8f70a0fedc3714116 /src/de/blinkt/openvpn/ConfigParser.java
parenta142f5a6ebeeaa6b4f8e8ac559b3ea08d0677bf1 (diff)
parentd18dfef96c176e0d48160daa610b8664dba81c68 (diff)
Merge
Diffstat (limited to 'src/de/blinkt/openvpn/ConfigParser.java')
-rw-r--r--src/de/blinkt/openvpn/ConfigParser.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/ConfigParser.java b/src/de/blinkt/openvpn/ConfigParser.java
index 913fda24..b897f63a 100644
--- a/src/de/blinkt/openvpn/ConfigParser.java
+++ b/src/de/blinkt/openvpn/ConfigParser.java
@@ -225,6 +225,7 @@ public class ConfigParser {
"persist-tun",
"persist-key",
"register-dns",
+ "route-delay",
"route-gateway",
"route-metric",
"route-method",
@@ -424,14 +425,20 @@ public class ConfigParser {
if(getOption("nobind", 0, 0) != null)
np.mNobind=true;
- if(getOption("auth-user-pass",0,1) != null) {
+ Vector<String> authuser = getOption("auth-user-pass",0,1);
+ if(authuser !=null){
+
if(noauthtypeset) {
np.mAuthenticationType=VpnProfile.TYPE_USERPASS;
} else if(np.mAuthenticationType==VpnProfile.TYPE_CERTIFICATES) {
np.mAuthenticationType=VpnProfile.TYPE_USERPASS_CERTIFICATES;
} else if(np.mAuthenticationType==VpnProfile.TYPE_KEYSTORE) {
np.mAuthenticationType=VpnProfile.TYPE_USERPASS_KEYSTORE;
- }
+ }
+ if(authuser.size()>1) {
+ np.mName=authuser.get(1);
+ }
+
}
@@ -494,7 +501,7 @@ public class ConfigParser {
if(optionline.size()< (minarg+1) || optionline.size() > maxarg+1) {
String err = String.format("Option %s has %d parameters, expected between %d and %d",
- option,args.size()-1,minarg,maxarg );
+ option,optionline.size()-1,minarg,maxarg );
throw new ConfigParseError(err);
}
options.remove(option);