summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/de/blinkt/openvpn/VpnProfile.java2
-rw-r--r--app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java6
2 files changed, 6 insertions, 2 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java
index f2da0838..c010ef54 100644
--- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java
+++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java
@@ -229,7 +229,7 @@ public class VpnProfile implements Serializable, Cloneable {
//! Put inline data inline and other data as normal escaped filename
public static String insertFileData(String cfgentry, String filedata) {
if (filedata == null) {
- return String.format("%s %s\n", cfgentry, "file missing in config profile");
+ return String.format("# %s %s\n", cfgentry, "file missing in config profile");
} else if (isEmbedded(filedata)) {
String dataWithOutHeader = getEmbeddedContent(filedata);
return String.format(Locale.ENGLISH, "<%s>\n%s\n</%s>\n", cfgentry, dataWithOutHeader, cfgentry);
diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 4a8bcf99..10dd7033 100644
--- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -561,7 +561,11 @@ public class ConfigParser {
}
} else if (!TextUtils.isEmpty(np.mCipher) && !np.mCipher.equals("AES-128-GCM") && !np.mCipher.equals("AES-256"))
{
- np.mDataCiphers += "AES-256-GCM:AES-128-GCM:" + np.mCipher;
+ if (np.mCipher.contains("AES-256-GCM")) {
+ np.mDataCiphers += np.mCipher;
+ } else {
+ np.mDataCiphers += "AES-256-GCM:AES-128-GCM:" + np.mCipher;
+ }
}
Vector<String> auth = getOption("auth", 1, 1);