Oops, forgot to hook CVE-2007-1218 fix into building.
[dragonfly.git] / contrib / hostapd-0.4.9 / eap_tls_common.h
blob659ee849f7b03680ce00da7a228da49072662c71
1 #ifndef EAP_TLS_COMMON_H
2 #define EAP_TLS_COMMON_H
4 struct eap_ssl_data {
5 struct tls_connection *conn;
7 u8 *tls_out;
8 size_t tls_out_len;
9 size_t tls_out_pos;
10 size_t tls_out_limit;
11 u8 *tls_in;
12 size_t tls_in_len;
13 size_t tls_in_left;
14 size_t tls_in_total;
16 int phase2;
18 struct eap_sm *eap;
22 /* EAP TLS Flags */
23 #define EAP_TLS_FLAGS_LENGTH_INCLUDED 0x80
24 #define EAP_TLS_FLAGS_MORE_FRAGMENTS 0x40
25 #define EAP_TLS_FLAGS_START 0x20
26 #define EAP_PEAP_VERSION_MASK 0x07
28 /* could be up to 128 bytes, but only the first 64 bytes are used */
29 #define EAP_TLS_KEY_LEN 64
32 int eap_tls_ssl_init(struct eap_sm *sm, struct eap_ssl_data *data,
33 int verify_peer);
34 void eap_tls_ssl_deinit(struct eap_sm *sm, struct eap_ssl_data *data);
35 u8 * eap_tls_derive_key(struct eap_sm *sm, struct eap_ssl_data *data,
36 char *label, size_t len);
37 int eap_tls_data_reassemble(struct eap_sm *sm, struct eap_ssl_data *data,
38 u8 **in_data, size_t *in_len);
39 int eap_tls_process_helper(struct eap_sm *sm, struct eap_ssl_data *data,
40 u8 *in_data, size_t in_len);
41 int eap_tls_buildReq_helper(struct eap_sm *sm, struct eap_ssl_data *data,
42 int eap_type, int peap_version, u8 id,
43 u8 **out_data, size_t *out_len);
44 u8 * eap_tls_build_ack(size_t *reqDataLen, u8 id, int eap_type,
45 int peap_version);
47 #endif /* EAP_TLS_COMMON_H */