summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/Settings_Authentication.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-02-02 16:37:43 +0100
committerArne Schwabe <arne@rfc2549.org>2013-02-02 16:37:43 +0100
commitf00cd03f5aa1f8042b55ebee5050d297cef6bb8a (patch)
treed6366f6696889de81932df08bec243f06e547cf2 /src/de/blinkt/openvpn/Settings_Authentication.java
parentdbd9cf8fadb8d2911a20ad4fd3ddb708a7b77dba (diff)
Add the --auth option to the auth/enc dialog
Diffstat (limited to 'src/de/blinkt/openvpn/Settings_Authentication.java')
-rw-r--r--src/de/blinkt/openvpn/Settings_Authentication.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/Settings_Authentication.java b/src/de/blinkt/openvpn/Settings_Authentication.java
index 6733ed0c..4e3f1e6f 100644
--- a/src/de/blinkt/openvpn/Settings_Authentication.java
+++ b/src/de/blinkt/openvpn/Settings_Authentication.java
@@ -23,6 +23,7 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
private SwitchPreference mUseTLSAuth;
private EditTextPreference mCipher;
private String mTlsAuthFileData;
+ private EditTextPreference mAuth;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -46,6 +47,9 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
mCipher =(EditTextPreference) findPreference("cipher");
mCipher.setOnPreferenceChangeListener(this);
+ mAuth =(EditTextPreference) findPreference("auth");
+ mAuth.setOnPreferenceChangeListener(this);
+
loadSettings();
}
@@ -64,6 +68,8 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
mTLSAuthDirection.setValue(mProfile.mTLSAuthDirection);
mCipher.setText(mProfile.mCipher);
onPreferenceChange(mCipher, mProfile.mCipher);
+ mAuth.setText(mProfile.mAuth);
+ onPreferenceChange(mAuth, mProfile.mAuth);
}
@Override
@@ -85,6 +91,11 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
else
mProfile.mCipher = mCipher.getText();
+ if(mAuth.getText()==null)
+ mProfile.mAuth = null;
+ else
+ mProfile.mAuth = mAuth.getText();
+
}
@@ -96,7 +107,7 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
preference.setSummary(mProfile.mServerName);
else
preference.setSummary((String)newValue);
- } else if (preference == mCipher) {
+ } else if (preference == mCipher || preference == mAuth) {
preference.setSummary((CharSequence) newValue);
}
return true;