commit bdcff2cdde99b87b96219dda530a8774bb5a022d
parent 87c411f81683f65816ab21885ed1c9357b7ce340
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date: Fri, 16 Nov 2018 14:15:32 -0800
eap: Add accessors for the method name and type
Diffstat:
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/eap-private.h b/src/eap-private.h
@@ -109,6 +109,9 @@ void eap_discard_success_and_failure(struct eap_state *eap, bool discard);
void eap_set_data(struct eap_state *eap, void *data);
void *eap_get_data(struct eap_state *eap);
+enum eap_type eap_get_method_type(struct eap_state *eap);
+const char *eap_get_method_name(struct eap_state *eap);
+
void eap_send_response(struct eap_state *eap,
enum eap_type request_type,
uint8_t *buf, size_t len);
diff --git a/src/eap.c b/src/eap.c
@@ -2,7 +2,7 @@
*
* Wireless daemon for Linux
*
- * Copyright (C) 2013-2014 Intel Corporation. All rights reserved.
+ * Copyright (C) 2013-2018 Intel Corporation. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -590,6 +590,16 @@ void *eap_get_data(struct eap_state *eap)
return eap->method_state;
}
+enum eap_type eap_get_method_type(struct eap_state *eap)
+{
+ return eap->method->request_type;
+}
+
+const char *eap_get_method_name(struct eap_state *eap)
+{
+ return eap->method->name;
+}
+
void eap_set_key_material(struct eap_state *eap,
const uint8_t *msk_data, size_t msk_len,
const uint8_t *emsk_data, size_t emsk_len,