summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2019-03-25 14:35:23 -0700
committerHai Shalom <haishalom@google.com>2019-03-25 14:57:31 -0700
commit80ce9b20ff0678e07fecd07b378e591a76d69bcd (patch)
tree7b39629c5db2a20a567470d401323468827d9d00 /service
parentb134333f33a9dc9bfe7a79ac29132add91bbc8ed (diff)
[WPA3] Initialize Suite-B ciphers correctly based on the CA cert type
Initialize Suite-B ciphers correctly based on the CA cert type. Read the cert type from key store, parse it and get the signature algorithm. Enforce SHA384, and initialize AllowedSuiteBCiphers based on the certificate type: RSA or ECSDA. Wi-Fi alliance requires the use of both ECDSA secp384r1 and RSA 3072 certificates in WPA3-Enterprise 192-bit security networks, which are also known as Suite-B-192 netowkrs, even though NSA Suite-B-192 mandates ECDSA only. The use of the term Suite-B was already coined in the IEEE 802.11-2016 specification for AKM 00-0F-AC but the test plan for WPA3-Enterprise 192-bit for APs mandates support for both RSA and ECDSA, and for STAs it mandates ECDSA and optionally RSA. In order to be compatible with all WPA3-Enterprise 192-bit deployments, Bug: 128861164 Test: Verify Suite-B initialized correctly with RSA and ECDSA certs. Test: Associate to SUITE_B_192 AP with RSA certificate Test: Associate to SUITE_B_192 AP with ECDSA certificate Change-Id: I8adc96ffb61fc7176a5efc4c7d6ac1fb6c1598c6
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java6
-rw-r--r--service/java/com/android/server/wifi/WifiKeyStore.java23
2 files changed, 20 insertions, 9 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index f21ac7729..81b513920 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -936,11 +936,7 @@ public class WifiConfigManager {
internalConfig.allowedGroupManagementCiphers =
(BitSet) externalConfig.allowedGroupManagementCiphers.clone();
}
- if (externalConfig.allowedSuiteBCiphers != null
- && !externalConfig.allowedSuiteBCiphers.isEmpty()) {
- internalConfig.allowedSuiteBCiphers =
- (BitSet) externalConfig.allowedSuiteBCiphers.clone();
- }
+ // allowedSuiteBCiphers is set internally according to the certificate type
// Copy over the |IpConfiguration| parameters if set.
if (externalConfig.getIpConfiguration() != null) {
diff --git a/service/java/com/android/server/wifi/WifiKeyStore.java b/service/java/com/android/server/wifi/WifiKeyStore.java
index 9c1d85ef9..a22be9b51 100644
--- a/service/java/com/android/server/wifi/WifiKeyStore.java
+++ b/service/java/com/android/server/wifi/WifiKeyStore.java
@@ -296,7 +296,7 @@ public class WifiKeyStore {
}
}
- // For Suite-B-192 (WPA3-Enterprise), set the SuiteBCipher field based on the
+ // For WPA3-Enterprise 192-bit networks, set the SuiteBCipher field based on the
// CA certificate type. Suite-B requires SHA384, reject other certs.
if (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SUITE_B_192)) {
// Read the first CA certificate, and initialize
@@ -317,8 +317,24 @@ public class WifiKeyStore {
Log.d(TAG, "Signature algorithm: " + sigAlgOid);
}
config.allowedSuiteBCiphers.clear();
- // ecdsa-with-SHA384
- if (sigAlgOid.equals("1.2.840.10045.4.3.3")) {
+
+ // Wi-Fi alliance requires the use of both ECDSA secp384r1 and RSA 3072 certificates
+ // in WPA3-Enterprise 192-bit security networks, which are also known as Suite-B-192
+ // networks, even though NSA Suite-B-192 mandates ECDSA only. The use of the term
+ // Suite-B was already coined in the IEEE 802.11-2016 specification for
+ // AKM 00-0F-AC but the test plan for WPA3-Enterprise 192-bit for APs mandates
+ // support for both RSA and ECDSA, and for STAs it mandates ECDSA and optionally
+ // RSA. In order to be compatible with all WPA3-Enterprise 192-bit deployments,
+ // we are supporting both types here.
+ if (sigAlgOid.equals("1.2.840.113549.1.1.12")) {
+ // sha384WithRSAEncryption
+ config.allowedSuiteBCiphers.set(
+ WifiConfiguration.SuiteBCipher.ECDHE_RSA);
+ if (mVerboseLoggingEnabled) {
+ Log.d(TAG, "Selecting Suite-B RSA");
+ }
+ } else if (sigAlgOid.equals("1.2.840.10045.4.3.3")) {
+ // ecdsa-with-SHA384
config.allowedSuiteBCiphers.set(
WifiConfiguration.SuiteBCipher.ECDHE_ECDSA);
if (mVerboseLoggingEnabled) {
@@ -334,7 +350,6 @@ public class WifiKeyStore {
return false;
}
}
-
return true;
}
}