diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-08-17 17:21:23 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2015-08-17 17:21:23 +0200 |
commit | a34b7a56fb7f09c1fa5a64a74c5aed3ec782bdb9 (patch) | |
tree | 790722c1f7778e58907d8f03dde5efb6bfb0d60b /main/src | |
parent | 760a17bfc38cfc5e1d3325ae41ed8af335f2dcac (diff) |
Fix crl-verify if the crl path has spaces in it.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java index 1eaca6c5..f316eeaa 100644 --- a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java +++ b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java @@ -185,14 +185,6 @@ public class ConfigConverter extends Activity implements FileSelectCallback, Vie if (!TextUtils.isEmpty(mEmbeddedPwFile)) ConfigParser.useEmbbedUserAuth(mResult, mEmbeddedPwFile); - - // Only use crl on import if it is found - ConfigParser.removeCRLCustomOption(mResult); - if (!TextUtils.isEmpty(mCrlFileName)) { - // TODO: Convert this to a real config option that is parsed - mResult.mCustomConfigOptions += "\ncrl-verify " + mCrlFileName; - } - vpl.addProfile(mResult); vpl.saveProfile(this, mResult); vpl.saveProfileList(this); @@ -518,6 +510,15 @@ public class ConfigConverter extends Activity implements FileSelectCallback, Vie mEmbeddedPwFile = cp.getAuthUserPassFile(); mEmbeddedPwFile = embedFile(cp.getAuthUserPassFile(), Utils.FileType.USERPW_FILE, false); mCrlFileName = embedFile(cp.getCrlVerifyFile(), Utils.FileType.CRL_FILE, true); + + ConfigParser.removeCRLCustomOption(mResult); + if (!TextUtils.isEmpty(mCrlFileName)) { + // TODO: Convert this to a real config option that is parsed + ConfigParser.removeCRLCustomOption(mResult); + mResult.mCustomConfigOptions += "\ncrl-verify " + VpnProfile.openVpnEscape(mCrlFileName); + } else if (!TextUtils.isEmpty(cp.getCrlVerifyFile())) { + mResult.mCustomConfigOptions += "\n#crl-verify " + VpnProfile.openVpnEscape(cp.getCrlVerifyFile()); + } } @Override |