tls-socket: Don't fail reading if sending data failed

If data is processed that eventually includes a TLS close notify, build()
will fail after a close notify has been sent in turn.  However, propagating
that error immediately when reading prevented ever returning the data
already processed before the close notify was received.
This commit is contained in:
Tobias Brunner
2021-02-12 11:45:44 +01:00
parent d532d6c7bc
commit 09fbaad6bd
+5 -1
View File
@@ -188,7 +188,11 @@ static bool exchange(private_tls_socket_t *this, bool wr, bool block)
case SUCCESS:
return TRUE;
default:
return FALSE;
if (wr)
{
return FALSE;
}
break;
}
break;
}