OpenSSL: Silence "Failed to read possible Application Data"

This message from tls_connection_handshake() is not really an error in
most cases, so do not show it if there was indeed no Application Data
available (which is a normal scenario and not an indication of any
error).
This commit is contained in:
Jouni Malinen 2009-12-14 16:09:20 +02:00 committed by Jouni Malinen
parent b57e086cc1
commit d986b1b6c1

View file

@ -2060,9 +2060,18 @@ u8 * tls_connection_handshake(void *ssl_ctx, struct tls_connection *conn,
if (*appl_data) {
res = SSL_read(conn->ssl, *appl_data, in_len);
if (res < 0) {
tls_show_errors(MSG_INFO, __func__,
"Failed to read possible "
"Application Data");
int err = SSL_get_error(conn->ssl, res);
if (err == SSL_ERROR_WANT_READ ||
err == SSL_ERROR_WANT_WRITE) {
wpa_printf(MSG_DEBUG,
"SSL: No Application Data "
"included");
} else {
tls_show_errors(MSG_INFO, __func__,
"Failed to read "
"possible "
"Application Data");
}
os_free(*appl_data);
*appl_data = NULL;
} else {