aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/tlsv1_client.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-11-29 16:59:27 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-29 16:59:27 (GMT)
commitf2a6ad01a943103c658de5721c2d7f7e91ee7fa4 (patch)
tree73d1fbdd538d39173755a854b428c728894be2ec /src/tls/tlsv1_client.c
parentb115eebe01ca23848d3af786a6b22803a1b2fafc (diff)
downloadhostap-f2a6ad01a943103c658de5721c2d7f7e91ee7fa4.zip
hostap-f2a6ad01a943103c658de5721c2d7f7e91ee7fa4.tar.gz
hostap-f2a6ad01a943103c658de5721c2d7f7e91ee7fa4.tar.bz2
TLS client: Add support for server certificate probing
The internal TLS client implementation can now be used with ca_cert="probe://" to probe the server certificate chain. This is also adding the related CTRL-EVENT-EAP-TLS-CERT-ERROR and CTRL-EVENT-EAP-PEER-CERT events. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/tls/tlsv1_client.c')
-rw-r--r--src/tls/tlsv1_client.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tls/tlsv1_client.c b/src/tls/tlsv1_client.c
index 2fa43ad..49ebf2f 100644
--- a/src/tls/tlsv1_client.c
+++ b/src/tls/tlsv1_client.c
@@ -826,3 +826,15 @@ void tlsv1_client_set_session_ticket_cb(struct tlsv1_client *conn,
conn->session_ticket_cb = cb;
conn->session_ticket_cb_ctx = ctx;
}
+
+
+void tlsv1_client_set_cb(struct tlsv1_client *conn,
+ void (*event_cb)(void *ctx, enum tls_event ev,
+ union tls_event_data *data),
+ void *cb_ctx,
+ int cert_in_cb)
+{
+ conn->event_cb = event_cb;
+ conn->cb_ctx = cb_ctx;
+ conn->cert_in_cb = !!cert_in_cb;
+}