summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/fragments
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-01-16 23:56:08 +0100
committerArne Schwabe <arne@rfc2549.org>2014-01-16 23:56:08 +0100
commita5611ff5b14e15514c20a8f6e8143fa97f1f9bf5 (patch)
tree15fe8790912f41c87f541e94b795580b1f2d8eae /src/de/blinkt/openvpn/fragments
parent5ee6a9d698e6231f37a6d2a47e05459d107fb049 (diff)
make configuring —static profiles a bit easier
Diffstat (limited to 'src/de/blinkt/openvpn/fragments')
-rw-r--r--src/de/blinkt/openvpn/fragments/Settings_Authentication.java10
-rw-r--r--src/de/blinkt/openvpn/fragments/Settings_IP.java7
2 files changed, 15 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/fragments/Settings_Authentication.java b/src/de/blinkt/openvpn/fragments/Settings_Authentication.java
index 5dfb73d9..d8c4ac6a 100644
--- a/src/de/blinkt/openvpn/fragments/Settings_Authentication.java
+++ b/src/de/blinkt/openvpn/fragments/Settings_Authentication.java
@@ -76,6 +76,16 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
onPreferenceChange(mCipher, mProfile.mCipher);
mAuth.setText(mProfile.mAuth);
onPreferenceChange(mAuth, mProfile.mAuth);
+
+ if (mProfile.mAuthenticationType == VpnProfile.TYPE_STATICKEYS) {
+ mExpectTLSCert.setEnabled(false);
+ mCheckRemoteCN.setEnabled(false);
+ mUseTLSAuth.setChecked(true);
+ } else {
+ mExpectTLSCert.setEnabled(true);
+ mCheckRemoteCN.setEnabled(true);
+
+ }
}
@Override
diff --git a/src/de/blinkt/openvpn/fragments/Settings_IP.java b/src/de/blinkt/openvpn/fragments/Settings_IP.java
index 674a09d4..16e3a5c4 100644
--- a/src/de/blinkt/openvpn/fragments/Settings_IP.java
+++ b/src/de/blinkt/openvpn/fragments/Settings_IP.java
@@ -7,6 +7,7 @@ import android.preference.Preference.OnPreferenceChangeListener;
import android.preference.PreferenceManager;
import android.preference.SwitchPreference;
import de.blinkt.openvpn.R;
+import de.blinkt.openvpn.VpnProfile;
public class Settings_IP extends OpenVpnPreferencesFragment implements OnPreferenceChangeListener {
private EditTextPreference mIPv4;
@@ -62,14 +63,16 @@ public class Settings_IP extends OpenVpnPreferencesFragment implements OnPrefere
mOverrideDNS.setChecked(mProfile.mOverrideDNS);
mSearchdomain.setText(mProfile.mSearchDomain);
mNobind.setChecked(mProfile.mNobind);
-
+ if (mProfile.mAuthenticationType == VpnProfile.TYPE_STATICKEYS)
+ mUsePull.setChecked(false);
+
// Sets Summary
onPreferenceChange(mIPv4, mIPv4.getText());
onPreferenceChange(mIPv6, mIPv6.getText());
onPreferenceChange(mDNS1, mDNS1.getText());
onPreferenceChange(mDNS2, mDNS2.getText());
onPreferenceChange(mSearchdomain, mSearchdomain.getText());
-
+
setDNSState();
}