summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/VpnProfile.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java14
2 files changed, 12 insertions, 4 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
index 058e8097..5afb1fe5 100644
--- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
+++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
@@ -539,7 +539,7 @@ public class VpnProfile implements Serializable, Cloneable {
}
//! Put inline data inline and other data as normal escaped filename
- private String insertFileData(String cfgentry, String filedata) {
+ public static String insertFileData(String cfgentry, String filedata) {
if (filedata == null) {
// TODO: generate good error
return String.format("%s %s\n", cfgentry, "missing");
diff --git a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 232c454b..0d7d54c0 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -838,13 +838,21 @@ public class ConfigParser {
return false;
}
+ //! Generate options for custom options
private String getOptionStrings(Vector<Vector<String>> option) {
String custom = "";
for (Vector<String> optionsline : option) {
if (!ignoreThisOption(optionsline)) {
- for (String arg : optionsline)
- custom += VpnProfile.openVpnEscape(arg) + " ";
- custom += "\n";
+ // Check if option had been inlined and inline again
+ if (optionsline.size() == 2 && "extra-certs".equals(optionsline.get(0)) ) {
+ custom += VpnProfile.insertFileData(optionsline.get(0), optionsline.get(1));
+
+
+ } else {
+ for (String arg : optionsline)
+ custom += VpnProfile.openVpnEscape(arg) + " ";
+ custom += "\n";
+ }
}
}
return custom;