aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-11-29 17:41:37 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-29 17:41:37 (GMT)
commit20804fe8448df81a875e0b62d3ee01e696caa90a (patch)
tree67f3c096a347590870e9f33aeb38cf64476dad08 /src/crypto
parentbb0a72ab4621fff633ac719d71de04f574850b65 (diff)
downloadhostap-20804fe8448df81a875e0b62d3ee01e696caa90a.zip
hostap-20804fe8448df81a875e0b62d3ee01e696caa90a.tar.gz
hostap-20804fe8448df81a875e0b62d3ee01e696caa90a.tar.bz2
TLS: Add support for tls_get_version()
This allows wpa_supplicant to return eap_tls_version STATUS information when using the internal TLS client implementation. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/tls_internal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crypto/tls_internal.c b/src/crypto/tls_internal.c
index b91f181..ff773fe 100644
--- a/src/crypto/tls_internal.c
+++ b/src/crypto/tls_internal.c
@@ -635,7 +635,12 @@ int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
int tls_get_version(void *ssl_ctx, struct tls_connection *conn,
char *buf, size_t buflen)
{
- /* TODO */
+ if (conn == NULL)
+ return -1;
+#ifdef CONFIG_TLS_INTERNAL_CLIENT
+ if (conn->client)
+ return tlsv1_client_get_version(conn->client, buf, buflen);
+#endif /* CONFIG_TLS_INTERNAL_CLIENT */
return -1;
}