From: Jouni Malinen Date: Mon, 14 Dec 2009 14:09:20 +0000 (+0200) Subject: OpenSSL: Silence "Failed to read possible Application Data" X-Git-Tag: hostap_0_7_1~336 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d986b1b6c113083c8701abc54fd0c912fba329a6;p=thirdparty%2Fhostap.git 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). --- diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index 52eb4fe19..777405a10 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -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 {