From 3bf2f32fb42d6d75a331bd8517715c5e571c3c5b Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 16 Jul 2012 04:29:35 +0200 Subject: Fixes error reported on the Android market console - 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 --- src/de/blinkt/openvpn/ConfigParser.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/de/blinkt/openvpn/ConfigParser.java') 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> tlsauthoptions = getAllOption("tls-auth", 1, 2); - for(Vector tlsauth:tlsauthoptions) { - if(tlsauth!=null) - { - if(!tlsauth.get(1).equals("[inline]")) { - np.mTLSAuthFilename=tlsauth.get(1); - np.mUseTLSAuth=true; + if(tlsauthoptions!=null) { + for(Vector 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 direction = getOption("key-direction", 1, 1); if(direction!=null) np.mTLSAuthDirection=direction.get(1); -- cgit v1.2.3