aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-12-14 14:09:20 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-09 18:57:44 (GMT)
commita3077f77792ec3e14839b06fb8bccacb868727e1 (patch)
treec763b60886abb37c6b0e6ef64dc436f8fb0efbb0
parent23c70237be0ae79d3d11ce9d60d9977018c2f0dd (diff)
downloadhostap-06-a3077f77792ec3e14839b06fb8bccacb868727e1.zip
hostap-06-a3077f77792ec3e14839b06fb8bccacb868727e1.tar.gz
hostap-06-a3077f77792ec3e14839b06fb8bccacb868727e1.tar.bz2
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). (cherry picked from commit d986b1b6c113083c8701abc54fd0c912fba329a6)
-rw-r--r--src/crypto/tls_openssl.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index 2fe3804..b5a1d64 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -2049,9 +2049,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 {