Apply the new keystore and certtool library in Wifi setting.

1. Certificate related APIs were moved to CertTool. Therefore,
   we have to migrate to CertTool instead.
2. Unlock the keystore if it is not unlocked yet(send the intent
   out to credential storage) for EAP access points.
3. Add Password field for WPA_EAP and IEEE8021X(this is for
   phase 2 auth.)
This commit is contained in:
Chung-yih Wang
2009-07-06 17:03:53 +08:00
parent 4e45d392ad
commit eb7836f11e
4 changed files with 123 additions and 109 deletions

View File

@@ -276,7 +276,12 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
requestRefresh();
}
}
public boolean isEnterprise() {
return (WPA_EAP.equals(security) ||
AccessPointState.IEEE8021X.equals(security));
}
public void setSecurity(String security) {
if (TextUtils.isEmpty(this.security) || !this.security.equals(security)) {
this.security = security;
@@ -592,14 +597,17 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
} else if (security.equals(OPEN)) {
config.allowedKeyManagement.set(KeyMgmt.NONE);
} else if (security.equals(WPA_EAP)) {
} else if (security.equals(WPA_EAP) || security.equals(IEEE8021X)) {
config.allowedGroupCiphers.set(GroupCipher.TKIP);
config.allowedGroupCiphers.set(GroupCipher.CCMP);
config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
} else if (security.equals(IEEE8021X)) {
config.allowedGroupCiphers.set(GroupCipher.TKIP);
config.allowedGroupCiphers.set(GroupCipher.CCMP);
config.allowedKeyManagement.set(KeyMgmt.IEEE8021X);
if (security.equals(WPA_EAP)) {
config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
} else {
config.allowedKeyManagement.set(KeyMgmt.IEEE8021X);
}
if (!TextUtils.isEmpty(mPassword)) {
config.password = convertToQuotedString(mPassword);
}
}
}