esp_err_t esp_wifi_sta_wpa2_ent_set_password(const unsigned char *password, int len);
esp_err_t esp_wifi_sta_wpa2_ent_set_password(const unsigned char *password, int len);
/**
/**
* @brief Clear password for PEAP/TTLS method..
* @brief Clear password for PEAP/TTLS method..
*/
*/
void esp_wifi_sta_wpa2_ent_clear_password(void);
void esp_wifi_sta_wpa2_ent_clear_password(void);
/**
/**
* @brief Set new password for MSCHAPv2 method..
* @brief Set new password for MSCHAPv2 method..
*
*
* @attention 1. The API only passes the parameter password to the global pointer variable in wpa2 enterprise module.
* @attention 1. The API only passes the parameter password to the global pointer variable in wpa2 enterprise module.
* @attention 2. The new password is used to substitute the old password when eap-mschapv2 failure request message with error code ERROR_PASSWD_EXPIRED is received.
* @attention 2. The new password is used to substitute the old password when eap-mschapv2 failure request message with error code ERROR_PASSWD_EXPIRED is received.
*
*
* @param new_password: point to address where stores the password;
* @param new_password: point to address where stores the password;
* @attention 1. The API only passes the parameter ca_cert to the global pointer variable in wpa2 enterprise module.
* @attention 1. The API only passes the parameter ca_cert to the global pointer variable in wpa2 enterprise module.
* @attention 2. The ca_cert should be zero terminated.
* @attention 2. The ca_cert should be zero terminated.
*
*
* @param ca_cert: point to address where stores the CA certificate;
* @param ca_cert: point to address where stores the CA certificate;
* @param ca_cert_len: length of ca_cert
* @param ca_cert_len: length of ca_cert
*
*
* @return
* @return
* - ESP_OK: succeed
* - ESP_OK: succeed
*/
*/
esp_err_t esp_wifi_sta_wpa2_ent_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len);
esp_err_t esp_wifi_sta_wpa2_ent_set_ca_cert(const unsigned char *ca_cert, int ca_cert_len);
/**
/**
* @brief Clear CA certificate for PEAP/TTLS method.
* @brief Clear CA certificate for PEAP/TTLS method.
*/
*/
void esp_wifi_sta_wpa2_ent_clear_ca_cert(void);
void esp_wifi_sta_wpa2_ent_clear_ca_cert(void);
/**
/**
* @brief Set client certificate and key.
* @brief Set client certificate and key.
*
*
* @attention 1. The API only passes the parameter client_cert, private_key and private_key_passwd to the global pointer variable in wpa2 enterprise module.
* @attention 1. The API only passes the parameter client_cert, private_key and private_key_passwd to the global pointer variable in wpa2 enterprise module.
* @attention 2. The client_cert, private_key and private_key_passwd should be zero terminated.
* @attention 2. The client_cert, private_key and private_key_passwd should be zero terminated.
*
*
* @param client_cert: point to address where stores the client certificate;
* @param client_cert: point to address where stores the client certificate;
* @param client_cert_len: length of client certificate;
* @param client_cert_len: length of client certificate;
* @param private_key: point to address where stores the private key;
* @param private_key: point to address where stores the private key;
* @param private_key_len: length of private key, limited to 1~2048;
* @param private_key_len: length of private key, limited to 1~2048;
* @param private_key_password: point to address where stores the private key password;
* @param private_key_password: point to address where stores the private key password;
* @param private_key_password_len: length of private key password;
* @param private_key_password_len: length of private key password;
*
*
* @return
* @return
* - ESP_OK: succeed
* - ESP_OK: succeed
*/
*/
esp_err_t esp_wifi_sta_wpa2_ent_set_cert_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_passwd, int private_key_passwd_len);
esp_err_t esp_wifi_sta_wpa2_ent_set_cert_key(const unsigned char *client_cert, int client_cert_len, const unsigned char *private_key, int private_key_len, const unsigned char *private_key_passwd, int private_key_passwd_len);
/**
/**
* @brief Clear client certificate and key.
* @brief Clear client certificate and key.
*/
*/
void esp_wifi_sta_wpa2_ent_clear_cert_key(void);
void esp_wifi_sta_wpa2_ent_clear_cert_key(void);
/**
/**
* @brief Set wpa2 enterprise certs time check(disable or not).
* @brief Set wpa2 enterprise certs time check(disable or not).
*
*
* @param true: disable wpa2 enterprise certs time check
* @param true: disable wpa2 enterprise certs time check
* @param false: enable wpa2 enterprise certs time check
* @param false: enable wpa2 enterprise certs time check