From 2b6c6b1cd53a4ae7c463f299d6114e17e8e1e4aa Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Fri, 22 Jun 2012 11:14:09 +0200 Subject: Fix openvpn error when no netmask is specified to a custom IP --- src/de/blinkt/openvpn/VpnProfile.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java index f482b173..d679cd00 100644 --- a/src/de/blinkt/openvpn/VpnProfile.java +++ b/src/de/blinkt/openvpn/VpnProfile.java @@ -385,9 +385,9 @@ public class VpnProfile implements Serializable{ private String cidrToIPAndNetmask(String route) { String[] parts = route.split("/"); - // No /xx, return verbatim + // No /xx, assume /32 as netmask if (parts.length ==1) - return route; + parts = (route + "/32").split("/"); if (parts.length!=2) return null; @@ -480,7 +480,6 @@ public class VpnProfile implements Serializable{ cachain = KeyChain.getCertificateChain(context, mAlias); if(cachain.length <= 1 && !nonNull(mCaFilename)) OpenVPN.logMessage(0, "", context.getString(R.string.keychain_nocacert)); - for(X509Certificate cert:cachain) { OpenVPN.logInfo(R.string.cert_from_keystore,cert.getSubjectDN()); -- cgit v1.2.3