summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2022-06-08 20:43:23 +0000
committercyberta <cyberta@riseup.net>2022-06-08 20:43:23 +0000
commit2c79b891cb4e946b400374fb1cd7e08ce14b25d6 (patch)
tree8dba856b961c24aa79e0471deb77f6361b28e569 /app/src/main/java
parent5cae0f2da73b837baba21c65f0927a4daa13e536 (diff)
parentf74783b9e734e23841c733a44e6db10a51a9021a (diff)
Merge branch 'prepare_riseup_infra_transition' into 'master'
Prepare riseup infra transition See merge request leap/bitmask_android!192
Diffstat (limited to 'app/src/main/java')
-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);