eap_fast_pac.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * EAP peer method: EAP-FAST PAC file processing
  3. * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef EAP_FAST_PAC_H
  9. #define EAP_FAST_PAC_H
  10. #include "eap_common/eap_fast_common.h"
  11. struct eap_fast_pac {
  12. struct eap_fast_pac *next;
  13. u8 pac_key[EAP_FAST_PAC_KEY_LEN];
  14. u8 *pac_opaque;
  15. size_t pac_opaque_len;
  16. u8 *pac_info;
  17. size_t pac_info_len;
  18. u8 *a_id;
  19. size_t a_id_len;
  20. u8 *i_id;
  21. size_t i_id_len;
  22. u8 *a_id_info;
  23. size_t a_id_info_len;
  24. u16 pac_type;
  25. };
  26. void eap_fast_free_pac(struct eap_fast_pac *pac);
  27. struct eap_fast_pac * eap_fast_get_pac(struct eap_fast_pac *pac_root,
  28. const u8 *a_id, size_t a_id_len,
  29. u16 pac_type);
  30. int eap_fast_add_pac(struct eap_fast_pac **pac_root,
  31. struct eap_fast_pac **pac_current,
  32. struct eap_fast_pac *entry);
  33. int eap_fast_load_pac(struct eap_sm *sm, struct eap_fast_pac **pac_root,
  34. const char *pac_file);
  35. int eap_fast_save_pac(struct eap_sm *sm, struct eap_fast_pac *pac_root,
  36. const char *pac_file);
  37. size_t eap_fast_pac_list_truncate(struct eap_fast_pac *pac_root,
  38. size_t max_len);
  39. int eap_fast_load_pac_bin(struct eap_sm *sm, struct eap_fast_pac **pac_root,
  40. const char *pac_file);
  41. int eap_fast_save_pac_bin(struct eap_sm *sm, struct eap_fast_pac *pac_root,
  42. const char *pac_file);
  43. #endif /* EAP_FAST_PAC_H */