wpa2_enterprise.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * ESPRESSIF MIT License
  3. *
  4. * Copyright (c) 2016 <ESPRESSIF SYSTEMS (SHANGHAI) PTE LTD>
  5. *
  6. * Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only, in which case,
  7. * it is free of charge, to any person obtaining a copy of this software and associated
  8. * documentation files (the "Software"), to deal in the Software without restriction, including
  9. * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. * and/or sell copies of the Software, and to permit persons to whom the Software is furnished
  11. * to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in all copies or
  14. * substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  18. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  19. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  20. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22. *
  23. */
  24. #ifndef __WPA2_ENTERPRISE_H__
  25. #define __WPA2_ENTERPRISE_H__
  26. typedef long os_time_t;
  27. struct os_time {
  28. os_time_t sec;
  29. os_time_t usec;
  30. };
  31. typedef int (* get_time_func_t)(struct os_time *t);
  32. int wifi_station_set_wpa2_enterprise_auth(int enable);
  33. int wifi_station_set_enterprise_cert_key(u8 *client_cert, int client_cert_len,
  34. u8 *private_key, int private_key_len,
  35. u8 *private_key_passwd, int private_key_passwd_len);
  36. void wifi_station_clear_enterprise_cert_key(void);
  37. int wifi_station_set_enterprise_ca_cert(u8 *ca_cert, int ca_cert_len);
  38. void wifi_station_clear_enterprise_ca_cert(void);
  39. int wifi_station_set_enterprise_username(u8 *username, int len);
  40. void wifi_station_clear_enterprise_username(void);
  41. int wifi_station_set_enterprise_password(u8 *password, int len);
  42. void wifi_station_clear_enterprise_password(void);
  43. int wifi_station_set_enterprise_new_password(u8 *new_password, int len);
  44. void wifi_station_clear_enterprise_new_password(void);
  45. void wifi_station_set_enterprise_disable_time_check(bool disable);
  46. bool wifi_station_get_enterprise_disable_time_check(void);
  47. void wpa2_enterprise_set_user_get_time(get_time_func_t cb);
  48. #endif /* __WPA2_ENTERPRISE_H__ */