supplicant(interface): Add support for get/set raw psk
Bug: 36013886
Test: Compiles
Change-Id: I2e90e3f6533d2271144404a3de3b19854b001c2f
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
index 37e8d3f..7d5159a 100644
--- a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -277,6 +277,20 @@
setPskPassphrase(string psk) generates (SupplicantStatus status);
/**
+ * Set raw psk for WPA_PSK network.
+ *
+ * @param psk value to set as specified in IEEE 802.11i-2004 standard.
+ * This is the calculated using 'wpa_passphrase <ssid> [passphrase]'
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+ */
+ setPsk(uint8_t[32] psk) generates (SupplicantStatus status);
+
+ /**
* Set WEP key for WEP network.
*
* @param keyIdx Index of wep key to set.
@@ -662,6 +676,8 @@
/**
* Get passphrase for WPA_PSK network.
+ * Must return a failure if network has no passphrase set (use |getPsk| if
+ * network was configured with raw psk instead).
*
* @return status Status of the operation.
* Possible status codes:
@@ -672,6 +688,19 @@
getPskPassphrase() generates (SupplicantStatus status, string psk);
/**
+ * Get raw psk for WPA_PSK network.
+ *
+ * @return status Status of the operation.
+ * Possible status codes:
+ * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+ * |SupplicantStatusCode.SUCCESS|,
+ * |SupplicantStatusCode.FAILURE_UNKNOWN|,
+ * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+ * @param psk value set.
+ */
+ getPsk() generates (SupplicantStatus status, uint8_t[32] psk);
+
+ /**
* Get WEP key for WEP network.
*
* @param keyIdx Index of wep key to be fetched.