Add callback path from wpa_supplicant core to
AidlManager::getCertificate.
Order of calls is:
1. eapol_sm_get_certificate (eapol_supp_sm.c)
2. wpa_supplicant_get_certificate_cb (wpas_glue.c)
3. wpas_get_certificate (notify.c)
4. wpas_aidl_get_certificate (aidl.cpp)
5. getCertificate (aidl_manager.cpp)
Bug: 205764502
Test: Manual test - store a key-value pair to
legacy Keystore. Check that we can retrieve
the value in supplicant using the new callbacks.
Change-Id: Ibe1fc5a2c50b818101c194bf739632d4c2a302a4
diff --git a/src/eap_peer/eap.h b/src/eap_peer/eap.h
index 8f83d0b..b98e878 100644
--- a/src/eap_peer/eap.h
+++ b/src/eap_peer/eap.h
@@ -304,6 +304,16 @@
* @reason_string: Information to log about the event
*/
void (*notify_open_ssl_failure)(void *ctx, const char* reason_string);
+
+ /**
+ * get_certificate - Retrieve a certificate from the certificate store
+ * @ctx: eapol_ctx from eap_peer_sm_init() call
+ * @alias: key into the certificate key-value store
+ * @value: pointer reference - pointer to the retrieved certificate will
+ * be stored here on success
+ * Returns: size of the retrieved certificate or -1 on error
+ */
+ ssize_t (*get_certificate)(void* ctx, const char* alias, uint8_t** value);
};
/**