summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java17
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