diff options
Diffstat (limited to 'src/de/blinkt/openvpn/fragments')
-rw-r--r-- | src/de/blinkt/openvpn/fragments/Settings_Authentication.java | 10 | ||||
-rw-r--r-- | src/de/blinkt/openvpn/fragments/Settings_IP.java | 7 |
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(); } |