summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-12-07 18:50:52 -0800
committerSteve Kondik <steve@cyngn.com>2015-12-07 18:50:52 -0800
commit10c07f778a611d8723619f67e5709cbd9e502a07 (patch)
tree2747712ffb2d61348ec7b241d0c2a764397a07a5 /wifi
parent45c11b1020a64aae88b859870d5b2e312dab4f76 (diff)
parent4d70bd7a928903b35c92619437c70bc382587b71 (diff)
downloadframeworks_base-10c07f778a611d8723619f67e5709cbd9e502a07.zip
frameworks_base-10c07f778a611d8723619f67e5709cbd9e502a07.tar.gz
frameworks_base-10c07f778a611d8723619f67e5709cbd9e502a07.tar.bz2
Merge tag 'android-6.0.1_r3' of https://android.googlesource.com/platform/frameworks/base into cm-13.0
Android 6.0.1 release 3 Change-Id: I59b9e5a943e0860d43bcfb36ee0e8b8b072412ea
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiEnterpriseConfig.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
index e611ea4..59b22bd 100644
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
@@ -101,9 +101,18 @@ public class WifiEnterpriseConfig implements Parcelable {
public static final String REALM_KEY = "realm";
/** @hide */
public static final String PLMN_KEY = "plmn";
+ /** @hide */
+ public static final String PHASE1_KEY = "phase1";
+ /** {@hide} */
+ public static final String ENABLE_TLS_1_2 = "\"tls_disable_tlsv1_2=0\"";
+ /** {@hide} */
+ public static final String DISABLE_TLS_1_2 = "\"tls_disable_tlsv1_2=1\"";
private HashMap<String, String> mFields = new HashMap<String, String>();
+ //By default, we enable TLS1.2. However, due to a known bug on some radius, we may disable it to
+ // fall back to TLS 1.1.
+ private boolean mTls12Enable = true;
private X509Certificate mCaCert;
private PrivateKey mClientPrivateKey;
private X509Certificate mClientCertificate;
@@ -149,6 +158,7 @@ public class WifiEnterpriseConfig implements Parcelable {
}
writeCertificate(dest, mClientCertificate);
+ dest.writeInt(mTls12Enable ? 1: 0);
}
private void writeCertificate(Parcel dest, X509Certificate cert) {
@@ -196,6 +206,7 @@ public class WifiEnterpriseConfig implements Parcelable {
enterpriseConfig.mClientPrivateKey = userKey;
enterpriseConfig.mClientCertificate = readCertificate(in);
+ enterpriseConfig.mTls12Enable = (in.readInt() == 1);
return enterpriseConfig;
}
@@ -300,6 +311,26 @@ public class WifiEnterpriseConfig implements Parcelable {
}
/**
+ * Set the TLS version
+ * @param enable: true -- enable TLS1.2 false -- disable TLS1.2
+ * @hide
+ */
+ public void setTls12Enable(boolean enable) {
+ mTls12Enable = enable;
+ mFields.put(PHASE1_KEY,
+ enable ? ENABLE_TLS_1_2 : DISABLE_TLS_1_2);
+ }
+
+ /**
+ * Get the TLS1.2 enabled or not
+ * @return eap method configured
+ * @hide
+ */
+ public boolean getTls12Enable() {
+ return mTls12Enable;
+ }
+
+ /**
* Get the eap method.
* @return eap method configured
*/