commit f07119b33a0f219215b3968a44291f19888213ac
parent 6490ecd61521890e8660f014886197c9a185cdf8
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Thu, 29 Nov 2018 14:41:45 -0800
eap-tls-common: Add tunnel API for send, close
Diffstat:
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/eap-tls-common.c b/src/eap-tls-common.c
@@ -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);
+}
diff --git a/src/eap-tls-common.h b/src/eap-tls-common.h
@@ -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);