hostapd/src/eap_peer/eap_teap_pac.h
Jouni Malinen 0ed57c5ea8 EAP-TEAP server and peer implementation (RFC 7170)
This adds support for a new EAP method: EAP-TEAP (Tunnel Extensible
Authentication Protocol). This should be considered experimental since
RFC 7170 has number of conflicting statements and missing details to
allow unambiguous interpretation. As such, there may be interoperability
issues with other implementations and this version should not be
deployed for production purposes until those unclear areas are resolved.

This does not yet support use of NewSessionTicket message to deliver a
new PAC (either in the server or peer implementation). In other words,
only the in-tunnel distribution of PAC-Opaque is supported for now. Use
of the NewSessionTicket mechanism would require TLS library support to
allow arbitrary data to be specified as the contents of the message.

Signed-off-by: Jouni Malinen <j@w1.fi>
2019-07-09 16:56:02 +03:00

50 lines
1.4 KiB
C

/*
* EAP peer method: EAP-TEAP PAC file processing
* Copyright (c) 2004-2019, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#ifndef EAP_TEAP_PAC_H
#define EAP_TEAP_PAC_H
#include "eap_common/eap_teap_common.h"
struct eap_teap_pac {
struct eap_teap_pac *next;
u8 pac_key[EAP_TEAP_PAC_KEY_LEN];
u8 *pac_opaque;
size_t pac_opaque_len;
u8 *pac_info;
size_t pac_info_len;
u8 *a_id;
size_t a_id_len;
u8 *i_id;
size_t i_id_len;
u8 *a_id_info;
size_t a_id_info_len;
u16 pac_type;
};
void eap_teap_free_pac(struct eap_teap_pac *pac);
struct eap_teap_pac * eap_teap_get_pac(struct eap_teap_pac *pac_root,
const u8 *a_id, size_t a_id_len,
u16 pac_type);
int eap_teap_add_pac(struct eap_teap_pac **pac_root,
struct eap_teap_pac **pac_current,
struct eap_teap_pac *entry);
int eap_teap_load_pac(struct eap_sm *sm, struct eap_teap_pac **pac_root,
const char *pac_file);
int eap_teap_save_pac(struct eap_sm *sm, struct eap_teap_pac *pac_root,
const char *pac_file);
size_t eap_teap_pac_list_truncate(struct eap_teap_pac *pac_root,
size_t max_len);
int eap_teap_load_pac_bin(struct eap_sm *sm, struct eap_teap_pac **pac_root,
const char *pac_file);
int eap_teap_save_pac_bin(struct eap_sm *sm, struct eap_teap_pac *pac_root,
const char *pac_file);
#endif /* EAP_TEAP_PAC_H */