1 #ifndef EAP_TLS_COMMON_H
2 #define EAP_TLS_COMMON_H
5 struct tls_connection
*conn
;
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
,
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
,
47 #endif /* EAP_TLS_COMMON_H */