wpa_supplicant: sync eap code with upstream

This commit is contained in:
Kapil Gupta
2022-05-13 12:57:47 +08:00
parent 36321fda82
commit c2429f1cf9
52 changed files with 6008 additions and 4730 deletions

View File

@@ -29,11 +29,14 @@ struct tlsv1_client {
u8 alert_level;
u8 alert_description;
unsigned int flags; /* TLS_CONN_* bitfield */
unsigned int certificate_requested:1;
unsigned int session_resumed:1;
unsigned int session_ticket_included:1;
unsigned int use_session_ticket:1;
unsigned int disable_time_checks:1;
unsigned int cert_in_cb:1;
unsigned int ocsp_resp_received:1;
struct crypto_public_key *server_rsa_key;
@@ -64,12 +67,20 @@ struct tlsv1_client {
void *session_ticket_cb_ctx;
struct wpabuf *partial_input;
void (*event_cb)(void *ctx, enum tls_event ev,
union tls_event_data *data);
void *cb_ctx;
struct x509_certificate *server_cert;
};
void tls_alert(struct tlsv1_client *conn, u8 level, u8 description);
void tlsv1_client_free_dh(struct tlsv1_client *conn);
int tls_derive_pre_master_secret(u8 *pre_master_secret);
u16 tls_client_highest_ver(struct tlsv1_client *conn);
int tls_derive_pre_master_secret(struct tlsv1_client *conn,
u8 *pre_master_secret);
int tls_derive_keys(struct tlsv1_client *conn,
const u8 *pre_master_secret, size_t pre_master_secret_len);
u8 * tls_send_client_hello(struct tlsv1_client *conn, size_t *out_len);
@@ -81,4 +92,11 @@ int tlsv1_client_process_handshake(struct tlsv1_client *conn, u8 ct,
const u8 *buf, size_t *len,
u8 **out_data, size_t *out_len);
enum tls_ocsp_result {
TLS_OCSP_NO_RESPONSE, TLS_OCSP_INVALID, TLS_OCSP_GOOD, TLS_OCSP_REVOKED
};
enum tls_ocsp_result tls_process_ocsp_response(struct tlsv1_client *conn,
const u8 *resp, size_t len);
#endif /* TLSV1_CLIENT_I_H */