OpenSSL: Handshake completion and resumption state into debug log
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 17 Aug 2015 22:53:17 +0000 (01:53 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 17 Aug 2015 22:56:05 +0000 (01:56 +0300)
This new debug log entry makes it more convenient to check how TLS
handshake was completed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/crypto/tls_openssl.c

index 325f01d..e3f8401 100644 (file)
@@ -3082,8 +3082,14 @@ openssl_connection_handshake(struct tls_connection *conn,
                return NULL;
        }
 
-       if (SSL_is_init_finished(conn->ssl) && appl_data && in_data)
-               *appl_data = openssl_get_appl_data(conn, wpabuf_len(in_data));
+       if (SSL_is_init_finished(conn->ssl)) {
+               wpa_printf(MSG_DEBUG,
+                          "OpenSSL: Handshake finished - resumed=%d",
+                          tls_connection_resumed(conn->ssl_ctx, conn));
+               if (appl_data && in_data)
+                       *appl_data = openssl_get_appl_data(conn,
+                                                          wpabuf_len(in_data));
+       }
 
        if (conn->invalid_hb_used) {
                wpa_printf(MSG_INFO, "TLS: Heartbeat attack detected - do not send response");