summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2018-12-04 17:12:06 +0100
committerArne Schwabe <arne@rfc2549.org>2018-12-04 17:12:06 +0100
commitb9ff2eaf5a42f191005bca1c1aa7736af45828bc (patch)
treef714656533aef76adb49ce8e15b75246f014536c /main/src
parentf461027896e3f969798c95651cec0b57ff0f0269 (diff)
Support tls-crypt-v2 in Configparser and UI
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/VpnProfile.java3
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java12
-rwxr-xr-xmain/src/main/res/values-de/arrays.xml1
-rw-r--r--main/src/main/res/values/arrays.xml1
-rw-r--r--main/src/main/res/values/untranslatable.xml3
5 files changed, 14 insertions, 6 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
index 85ee6807..cc8ba03a 100644
--- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
+++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
@@ -482,11 +482,14 @@ public class VpnProfile implements Serializable, Cloneable {
if (mUseTLSAuth) {
boolean useTlsCrypt = mTLSAuthDirection.equals("tls-crypt");
+ boolean useTlsCrypt2 = mTLSAuthDirection.equals("tls-crypt-v2");
if (mAuthenticationType == TYPE_STATICKEYS)
cfg.append(insertFileData("secret", mTLSAuthFilename));
else if (useTlsCrypt)
cfg.append(insertFileData("tls-crypt", mTLSAuthFilename));
+ else if (useTlsCrypt2)
+ cfg.append(insertFileData("tls-crypt-v2", mTLSAuthFilename));
else
cfg.append(insertFileData("tls-auth", mTLSAuthFilename));
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 0148bfb7..37641912 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -427,11 +427,13 @@ public class ConfigParser {
if (direction != null)
np.mTLSAuthDirection = direction.get(1);
- Vector<String> tlscrypt = getOption("tls-crypt", 1, 1);
- if (tlscrypt != null) {
- np.mUseTLSAuth = true;
- np.mTLSAuthFilename = tlscrypt.get(1);
- np.mTLSAuthDirection = "tls-crypt";
+ for (String crypt: new String[]{"tls-crypt", "tls-crypt-v2"}) {
+ Vector<String> tlscrypt = getOption(crypt, 1, 1);
+ if (tlscrypt != null) {
+ np.mUseTLSAuth = true;
+ np.mTLSAuthFilename = tlscrypt.get(1);
+ np.mTLSAuthDirection = crypt;
+ }
}
Vector<Vector<String>> defgw = getAllOption("redirect-gateway", 0, 7);
diff --git a/main/src/main/res/values-de/arrays.xml b/main/src/main/res/values-de/arrays.xml
index 5386f8c2..445c432f 100755
--- a/main/src/main/res/values-de/arrays.xml
+++ b/main/src/main/res/values-de/arrays.xml
@@ -22,6 +22,7 @@
<item translatable="false">1</item>
<item>Unspezifiziert</item>
<item>Verschlüsselung (--tls-crypt)</item>
+ <item>TLS Crypt v2</item>
</string-array>
<string-array name="crm_entries">
<item>Keine erneuter Verbindungsversuch</item>
diff --git a/main/src/main/res/values/arrays.xml b/main/src/main/res/values/arrays.xml
index 7b8f42db..3b7c42e1 100644
--- a/main/src/main/res/values/arrays.xml
+++ b/main/src/main/res/values/arrays.xml
@@ -22,6 +22,7 @@
<item translatable="false">1</item>
<item>Unspecified</item>
<item>Encryption (--tls-crypt)</item>
+ <item>TLS Crypt V2</item>
</string-array>
<string-array name="crm_entries">
<item>No reconnection retries</item>
diff --git a/main/src/main/res/values/untranslatable.xml b/main/src/main/res/values/untranslatable.xml
index e71d79ab..2823dd0c 100644
--- a/main/src/main/res/values/untranslatable.xml
+++ b/main/src/main/res/values/untranslatable.xml
@@ -5,7 +5,7 @@
<resources>
- <string name="copyright_blinktgui" translatable="false">Copyright 2012–2016 Arne Schwabe &lt;arne@rfc2549.org>
+ <string name="copyright_blinktgui" translatable="false">Copyright 2012–2018 Arne Schwabe &lt;arne@rfc2549.org>
</string>
<string name="copyright_logo" translatable="false">App Logo design by Helen Beierling
&lt;helbeierling@t-online.de>
@@ -42,6 +42,7 @@
<item>1</item>
<item></item>
<item>tls-crypt</item>
+ <item>tls-crypt-v2</item>
</string-array>
<string-array name="crm_values" translatable="false">
<item>1</item>