3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

eap-tls-common: Add tunnel API for send, close

This commit is contained in:
Tim Kourt 2018-11-29 14:41:45 -08:00 committed by Denis Kenzior
parent 6490ecd615
commit f07119b33a
2 changed files with 18 additions and 0 deletions

View File

@ -856,3 +856,18 @@ bool eap_tls_common_tunnel_prf_get_bytes(struct eap_state *eap,
return l_tls_prf_get_bytes(eap_tls->tunnel, use_master_secret,
label, buf, buf_len);
}
void eap_tls_common_tunnel_send(struct eap_state *eap, const uint8_t *data,
size_t data_len)
{
struct eap_tls_state *eap_tls = eap_get_data(eap);
l_tls_write(eap_tls->tunnel, data, data_len);
}
void eap_tls_common_tunnel_close(struct eap_state *eap)
{
struct eap_tls_state *eap_tls = eap_get_data(eap);
l_tls_close(eap_tls->tunnel);
}

View File

@ -78,3 +78,6 @@ bool eap_tls_common_tunnel_prf_get_bytes(struct eap_state *eap,
bool use_master_secret,
const char *label,
uint8_t *buf, size_t len);
void eap_tls_common_tunnel_send(struct eap_state *eap, const uint8_t *data,
size_t data_len);
void eap_tls_common_tunnel_close(struct eap_state *eap);