From d2a2bc2da305324c8be00cd683546896b00145d1 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 8 Jun 2022 21:11:48 +0200 Subject: openvpn config file inline warning should be a comment --- app/src/main/java/de/blinkt/openvpn/VpnProfile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java') 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\n", cfgentry, dataWithOutHeader, cfgentry); -- cgit v1.2.3 From f74783b9e734e23841c733a44e6db10a51a9021a Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 8 Jun 2022 21:13:55 +0200 Subject: test new ciphers setup and correct data-cipher parsing --- app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/src/main/java') 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 auth = getOption("auth", 1, 1); -- cgit v1.2.3