aboutsummaryrefslogtreecommitdiffstats
path: root/src/eapol_supp
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-09-17 19:42:54 (GMT)
committerJouni Malinen <j@w1.fi>2011-09-17 19:42:54 (GMT)
commit1b414f59fc46b8c88e606de122debf69e8b5faa8 (patch)
tree06b74e9a152f33d1ba4bc3dd21dff015362fea61 /src/eapol_supp
parent8a55f56453f55f7b9b634781b277833d09b3ca9a (diff)
downloadhostap-1b414f59fc46b8c88e606de122debf69e8b5faa8.zip
hostap-1b414f59fc46b8c88e606de122debf69e8b5faa8.tar.gz
hostap-1b414f59fc46b8c88e606de122debf69e8b5faa8.tar.bz2
eapol_test: Add option for writing server certificate chain to a file
eapol_test command line argument -o<file> can now be used to request the received server certificate chain to be written to the specified file. The certificates will be written in PEM format. [Bug 391]
Diffstat (limited to 'src/eapol_supp')
-rw-r--r--src/eapol_supp/eapol_supp_sm.c1
-rw-r--r--src/eapol_supp/eapol_supp_sm.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/eapol_supp/eapol_supp_sm.c b/src/eapol_supp/eapol_supp_sm.c
index bb6cff6..c4a0d8a 100644
--- a/src/eapol_supp/eapol_supp_sm.c
+++ b/src/eapol_supp/eapol_supp_sm.c
@@ -1883,6 +1883,7 @@ struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx)
conf.pkcs11_engine_path = ctx->pkcs11_engine_path;
conf.pkcs11_module_path = ctx->pkcs11_module_path;
conf.wps = ctx->wps;
+ conf.cert_in_cb = ctx->cert_in_cb;
sm->eap = eap_peer_sm_init(sm, &eapol_cb, sm->ctx->msg_ctx, &conf);
if (sm->eap == NULL) {
diff --git a/src/eapol_supp/eapol_supp_sm.h b/src/eapol_supp/eapol_supp_sm.h
index 3ea7e79..48813a9 100644
--- a/src/eapol_supp/eapol_supp_sm.h
+++ b/src/eapol_supp/eapol_supp_sm.h
@@ -231,6 +231,11 @@ struct eapol_ctx {
*/
void (*cert_cb)(void *ctx, int depth, const char *subject,
const char *cert_hash, const struct wpabuf *cert);
+
+ /**
+ * cert_in_cb - Include server certificates in callback
+ */
+ int cert_in_cb;
};