Add "GET tls_library" to provide information on TLS library and version
This new wpa_supplicant and hostapd control interface command can be used to determine which TLS library is used in the build and what is the version of that library. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
c3bb84b415
commit
a16514516b
8 changed files with 44 additions and 0 deletions
|
@ -556,4 +556,6 @@ void tls_connection_set_log_cb(struct tls_connection *conn,
|
|||
|
||||
void tls_connection_set_test_flags(struct tls_connection *conn, u32 flags);
|
||||
|
||||
int tls_get_library_version(char *buf, size_t buf_len);
|
||||
|
||||
#endif /* TLS_H */
|
||||
|
|
|
@ -1151,3 +1151,10 @@ int tls_connection_set_session_ticket_cb(void *tls_ctx,
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int tls_get_library_version(char *buf, size_t buf_len)
|
||||
{
|
||||
return os_snprintf(buf, buf_len, "GnuTLS build=%s run=%s",
|
||||
GNUTLS_VERSION, gnutls_check_version(NULL));
|
||||
}
|
||||
|
|
|
@ -672,3 +672,9 @@ int tls_connection_set_session_ticket_cb(void *tls_ctx,
|
|||
#endif /* CONFIG_TLS_INTERNAL_SERVER */
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int tls_get_library_version(char *buf, size_t buf_len)
|
||||
{
|
||||
return os_snprintf(buf, buf_len, "internal");
|
||||
}
|
||||
|
|
|
@ -192,3 +192,9 @@ unsigned int tls_capabilities(void *tls_ctx)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int tls_get_library_version(char *buf, size_t buf_len)
|
||||
{
|
||||
return os_snprintf(buf, buf_len, "none");
|
||||
}
|
||||
|
|
|
@ -3554,3 +3554,11 @@ int tls_connection_set_session_ticket_cb(void *tls_ctx,
|
|||
return -1;
|
||||
#endif /* EAP_FAST || EAP_FAST_DYNAMIC || EAP_SERVER_FAST */
|
||||
}
|
||||
|
||||
|
||||
int tls_get_library_version(char *buf, size_t buf_len)
|
||||
{
|
||||
return os_snprintf(buf, buf_len, "OpenSSL build=%s run=%s",
|
||||
OPENSSL_VERSION_TEXT,
|
||||
SSLeay_version(SSLEAY_VERSION));
|
||||
}
|
||||
|
|
|
@ -750,3 +750,9 @@ unsigned int tls_capabilities(void *tls_ctx)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int tls_get_library_version(char *buf, size_t buf_len)
|
||||
{
|
||||
return os_snprintf(buf, buf_len, "schannel");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue