Updated: October 28, 2024 |
Set enterprise credentials before creating or updating a Saved Network profile
#include <qwf/qwf_wifi.h>
qwf_wifi_Results_e qwf_wifi_SetEnterpriseCredentials(qwf_Context_t *pCtx, qwf_wifi_EapMethod_e eapMethod, char *pUsername, char *pPassword, char *pCaCertificate, char *pCaCertificateDir, char *pClientCertificate, char *pPrivateKey, char *pPrivateKeyPassword)
This function sets the enterprise credentials to be used for WPA-EAP or WPA2-EAP authentication. The client application must call this function to temporarily save these credentials before calling qwf_wifi_CreateSavedNetwork() or qwf_wifi_UpdateSavedNetwork().
The EAP method parameter is mandatory but the credential parameters are all optional, and each can be NULL if it's not needed by the specified EAP method. Any non-NULL parameter must refer to a NULL-terminated string.
After the Saved Network profile is created or updated, the credentials are reset to empty strings. At this point, the credentials are part of the persisted profile, and are used when connecting to the associated access point.
WIFI_OK Successful result
WIFI_ERR_INACTIVE The QWF Wi-Fi Manager service is inactive or not ready
WIFI_ERR_INT The QWF Wi-Fi Manager service couldn't issue the request or read the response
WIFI_ERR_PARAM A pointer argument is NULL, an invalid EAP method is given, or the QWF Wi-Fi Manager context can't be retrieved