HIDL changes to support Stadium Wifi.
Add ISupplicantStaNetwork to allow passing multiple identities to the
Supplicant.
Bug: 30988281
Test: compile
Change-Id: Id793b5b9b9c3cb478a63c23bc9446210a738bc38
diff --git a/wpa_supplicant/hidl/1.1/sta_network.cpp b/wpa_supplicant/hidl/1.1/sta_network.cpp
index 7af8f08..17991e7 100644
--- a/wpa_supplicant/hidl/1.1/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.1/sta_network.cpp
@@ -249,6 +249,14 @@
&StaNetwork::setEapIdentityInternal, _hidl_cb, identity);
}
+Return<void> StaNetwork::setEapEncryptedImsiIdentity(
+ const EapSimEncryptedIdentity &identity, setEapEncryptedImsiIdentity_cb _hidl_cb)
+{
+ return validateAndCall(
+ this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+ &StaNetwork::setEapEncryptedImsiIdentityInternal, _hidl_cb, identity);
+}
+
Return<void> StaNetwork::setEapAnonymousIdentity(
const hidl_vec<uint8_t> &identity, setEapAnonymousIdentity_cb _hidl_cb)
{
@@ -645,6 +653,17 @@
identity);
}
+Return<void> StaNetwork::sendNetworkEapIdentityResponse_1_1(
+ const EapSimIdentity &identity,
+ const EapSimEncryptedIdentity &encrypted_imsi_identity,
+ sendNetworkEapIdentityResponse_1_1_cb _hidl_cb)
+{
+ return validateAndCall(
+ this, SupplicantStatusCode::FAILURE_NETWORK_INVALID,
+ &StaNetwork::sendNetworkEapIdentityResponseInternal_1_1, _hidl_cb,
+ identity, encrypted_imsi_identity);
+}
+
std::pair<SupplicantStatus, uint32_t> StaNetwork::getIdInternal()
{
return {{SupplicantStatusCode::SUCCESS, ""}, network_id_};
@@ -975,6 +994,12 @@
return {SupplicantStatusCode::SUCCESS, ""};
}
+SupplicantStatus StaNetwork::setEapEncryptedImsiIdentityInternal(
+ const std::vector<uint8_t> &identity)
+{
+ return {SupplicantStatusCode::FAILURE_UNKNOWN, ""};
+}
+
SupplicantStatus StaNetwork::setEapAnonymousIdentityInternal(
const std::vector<uint8_t> &identity)
{
@@ -1639,6 +1664,12 @@
return {SupplicantStatusCode::SUCCESS, ""};
}
+SupplicantStatus StaNetwork::sendNetworkEapIdentityResponseInternal_1_1(
+ const std::vector<uint8_t> &identity, const std::vector<uint8_t> &encrypted_imsi_identity)
+{
+ return {SupplicantStatusCode::FAILURE_UNKNOWN, ""};
+}
+
/**
* Retrieve the underlying |wpa_ssid| struct pointer for
* this network.
diff --git a/wpa_supplicant/hidl/1.1/sta_network.h b/wpa_supplicant/hidl/1.1/sta_network.h
index c856163..b647773 100644
--- a/wpa_supplicant/hidl/1.1/sta_network.h
+++ b/wpa_supplicant/hidl/1.1/sta_network.h
@@ -15,7 +15,7 @@
#include <android-base/macros.h>
-#include <android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h>
+#include <android/hardware/wifi/supplicant/1.1/ISupplicantStaNetwork.h>
#include <android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.h>
extern "C" {
@@ -42,7 +42,7 @@
* object is used for control operations on a specific network
* controlled by wpa_supplicant.
*/
-class StaNetwork : public ISupplicantStaNetwork
+class StaNetwork : public V1_1::ISupplicantStaNetwork
{
public:
StaNetwork(
@@ -109,6 +109,9 @@
const hidl_string& path, setEapClientCert_cb _hidl_cb) override;
Return<void> setEapPrivateKeyId(
const hidl_string& id, setEapPrivateKeyId_cb _hidl_cb) override;
+ Return<void> setEapEncryptedImsiIdentity(
+ const EapSimEncryptedIdentity& identity,
+ setEapEncryptedImsiIdentity_cb _hidl_cb) override;
Return<void> setEapSubjectMatch(
const hidl_string& match, setEapSubjectMatch_cb _hidl_cb) override;
Return<void> setEapAltSubjectMatch(
@@ -186,6 +189,10 @@
Return<void> sendNetworkEapIdentityResponse(
const hidl_vec<uint8_t>& identity,
sendNetworkEapIdentityResponse_cb _hidl_cb) override;
+ Return<void> sendNetworkEapIdentityResponse_1_1(
+ const EapSimIdentity& identity,
+ const EapSimEncryptedIdentity& imsiIdentity,
+ sendNetworkEapIdentityResponse_1_1_cb _hidl_cb) override;
private:
// Corresponding worker functions for the HIDL methods.
@@ -215,6 +222,8 @@
ISupplicantStaNetwork::EapPhase2Method method);
SupplicantStatus setEapIdentityInternal(
const std::vector<uint8_t>& identity);
+ SupplicantStatus setEapEncryptedImsiIdentityInternal(
+ const std::vector<uint8_t>& identity);
SupplicantStatus setEapAnonymousIdentityInternal(
const std::vector<uint8_t>& identity);
SupplicantStatus setEapPasswordInternal(
@@ -287,6 +296,9 @@
SupplicantStatus sendNetworkEapSimUmtsAuthFailureInternal();
SupplicantStatus sendNetworkEapIdentityResponseInternal(
const std::vector<uint8_t>& identity);
+ SupplicantStatus sendNetworkEapIdentityResponseInternal_1_1(
+ const std::vector<uint8_t>& identity,
+ const std::vector<uint8_t>& imsi_identity);
struct wpa_ssid* retrieveNetworkPtr();
struct wpa_supplicant* retrieveIfacePtr();