aboutsummaryrefslogtreecommitdiffstats
path: root/eap_example
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-09-01 12:37:22 (GMT)
committerJouni Malinen <j@w1.fi>2019-09-01 14:19:31 (GMT)
commitb99c4cadb7f8f63b3e83b7b67af0d01250f2ad77 (patch)
tree4b40e2554e7b148ba86fba2f45d49c06386b04b8 /eap_example
parent6e711e7ab32c0fbf476c02424dc1e4e105b5637b (diff)
downloadhostap-b99c4cadb7f8f63b3e83b7b67af0d01250f2ad77.zip
hostap-b99c4cadb7f8f63b3e83b7b67af0d01250f2ad77.tar.gz
hostap-b99c4cadb7f8f63b3e83b7b67af0d01250f2ad77.tar.bz2
EAP peer: Move certificate configuration params into shared struct
These parameters for certificate authentication are identical for the Phase 1 (EAP-TLS alone) and Phase 2 (EAP-TLS inside a TLS tunnel). Furthermore, yet another copy would be needed to support separate machine credential in Phase 2. Clean this up by moving the shared parameters into a separate data struct that can then be used for each need without having to define separate struct members for each use. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'eap_example')
-rw-r--r--eap_example/eap_example_peer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eap_example/eap_example_peer.c b/eap_example/eap_example_peer.c
index 37b1db2..fcbfb12 100644
--- a/eap_example/eap_example_peer.c
+++ b/eap_example/eap_example_peer.c
@@ -299,7 +299,7 @@ int eap_example_peer_init(void)
eap_ctx.eap_config.identity_len = 4;
eap_ctx.eap_config.password = (u8 *) os_strdup("password");
eap_ctx.eap_config.password_len = 8;
- eap_ctx.eap_config.ca_cert = os_strdup("ca.pem");
+ eap_ctx.eap_config.cert.ca_cert = os_strdup("ca.pem");
eap_ctx.eap_config.fragment_size = 1398;
os_memset(&eap_cb, 0, sizeof(eap_cb));
@@ -332,7 +332,7 @@ void eap_example_peer_deinit(void)
wpabuf_free(eap_ctx.eapReqData);
os_free(eap_ctx.eap_config.identity);
os_free(eap_ctx.eap_config.password);
- os_free(eap_ctx.eap_config.ca_cert);
+ os_free(eap_ctx.eap_config.cert.ca_cert);
}