Loading src/com/android/settings/wifi/WifiConfigController.java +32 −19 Original line number Diff line number Diff line Loading @@ -535,16 +535,15 @@ public class WifiConfigController implements TextWatcher, config.enterpriseConfig.setPhase2Method(phase2Method); break; } String caCert = (String) mEapCaCertSpinner.getSelectedItem(); config.enterpriseConfig.setCaCertificateAliases(null); config.enterpriseConfig.setCaPath(null); config.enterpriseConfig.setDomainSuffixMatch(mEapDomainView.getText().toString()); if (caCert.equals(mUnspecifiedCertString) || caCert.equals(mDoNotValidateEapServerString)) { // Note: |caCert| should not be able to take the value |unspecifiedCert|, // since we prevent such configurations from being saved. config.enterpriseConfig.setCaCertificateAliases(null); } else { config.enterpriseConfig.setDomainSuffixMatch( mEapDomainView.getText().toString()); if (caCert.equals(mUseSystemCertsString)) { // ca_cert already set to null, so do nothing. } else if (caCert.equals(mUseSystemCertsString)) { config.enterpriseConfig.setCaPath(SYSTEM_CA_STORE_PATH); } else if (caCert.equals(mMultipleCertSetString)) { if (mAccessPoint != null) { Loading @@ -553,12 +552,26 @@ public class WifiConfigController implements TextWatcher, + "when editing saved network"); } config.enterpriseConfig.setCaCertificateAliases( mAccessPoint.getConfig().enterpriseConfig mAccessPoint .getConfig() .enterpriseConfig .getCaCertificateAliases()); } } else { config.enterpriseConfig.setCaCertificateAliases(new String[] {caCert}); } // ca_cert or ca_path should not both be non-null, since we only intend to let // the use either their own certificate, or the system certificates, not both. // The variable that is not used must explicitly be set to null, so that a // previously-set value on a saved configuration will be erased on an update. if (config.enterpriseConfig.getCaCertificateAliases() != null && config.enterpriseConfig.getCaPath() != null) { Log.e(TAG, "ca_cert (" + config.enterpriseConfig.getCaCertificateAliases() + ") and ca_path (" + config.enterpriseConfig.getCaPath() + ") should not both be non-null"); } String clientCert = (String) mEapUserCertSpinner.getSelectedItem(); Loading Loading
src/com/android/settings/wifi/WifiConfigController.java +32 −19 Original line number Diff line number Diff line Loading @@ -535,16 +535,15 @@ public class WifiConfigController implements TextWatcher, config.enterpriseConfig.setPhase2Method(phase2Method); break; } String caCert = (String) mEapCaCertSpinner.getSelectedItem(); config.enterpriseConfig.setCaCertificateAliases(null); config.enterpriseConfig.setCaPath(null); config.enterpriseConfig.setDomainSuffixMatch(mEapDomainView.getText().toString()); if (caCert.equals(mUnspecifiedCertString) || caCert.equals(mDoNotValidateEapServerString)) { // Note: |caCert| should not be able to take the value |unspecifiedCert|, // since we prevent such configurations from being saved. config.enterpriseConfig.setCaCertificateAliases(null); } else { config.enterpriseConfig.setDomainSuffixMatch( mEapDomainView.getText().toString()); if (caCert.equals(mUseSystemCertsString)) { // ca_cert already set to null, so do nothing. } else if (caCert.equals(mUseSystemCertsString)) { config.enterpriseConfig.setCaPath(SYSTEM_CA_STORE_PATH); } else if (caCert.equals(mMultipleCertSetString)) { if (mAccessPoint != null) { Loading @@ -553,12 +552,26 @@ public class WifiConfigController implements TextWatcher, + "when editing saved network"); } config.enterpriseConfig.setCaCertificateAliases( mAccessPoint.getConfig().enterpriseConfig mAccessPoint .getConfig() .enterpriseConfig .getCaCertificateAliases()); } } else { config.enterpriseConfig.setCaCertificateAliases(new String[] {caCert}); } // ca_cert or ca_path should not both be non-null, since we only intend to let // the use either their own certificate, or the system certificates, not both. // The variable that is not used must explicitly be set to null, so that a // previously-set value on a saved configuration will be erased on an update. if (config.enterpriseConfig.getCaCertificateAliases() != null && config.enterpriseConfig.getCaPath() != null) { Log.e(TAG, "ca_cert (" + config.enterpriseConfig.getCaCertificateAliases() + ") and ca_path (" + config.enterpriseConfig.getCaPath() + ") should not both be non-null"); } String clientCert = (String) mEapUserCertSpinner.getSelectedItem(); Loading