[glib-networking] Revert "openssl: account for internal TLS buffer in check function"
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Revert "openssl: account for internal TLS buffer in check function"
- Date: Fri, 4 Sep 2020 19:19:07 +0000 (UTC)
commit 1ce6d3e0fa31414c2fe936b4d94996c29c878591
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Sep 4 14:18:02 2020 -0500
Revert "openssl: account for internal TLS buffer in check function"
This reverts commit da11dc8ad9b11b9d3385451fc2eb9fcf3ad5890b.
tls/base/gtlsconnection-base.c | 3 ++-
tls/openssl/gtlsconnection-openssl.c | 14 --------------
2 files changed, 2 insertions(+), 15 deletions(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 49c35590..e184552d 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -924,7 +924,8 @@ g_tls_connection_base_check (GTlsConnectionBase *tls,
/* If base class says we are ready, then we are, regardless of the base
* stream status. This accounts for TLS-level buffers.
*/
- if (G_TLS_CONNECTION_BASE_GET_CLASS (tls)->check (tls, condition))
+ if (G_TLS_CONNECTION_BASE_GET_CLASS (tls)->check &&
+ G_TLS_CONNECTION_BASE_GET_CLASS (tls)->check (tls, condition))
{
ret = TRUE;
goto out;
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index 13bf1a56..cc405a8e 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -551,19 +551,6 @@ g_tls_connection_openssl_pop_io (GTlsConnectionBase *tls,
success, error);
}
-static gboolean
-g_tls_connection_openssl_check (GTlsConnectionBase *tls,
- GIOCondition direction)
-{
- GTlsConnectionOpenssl *openssl = G_TLS_CONNECTION_OPENSSL (tls);
- SSL *ssl = g_tls_connection_openssl_get_ssl (openssl);
-
- if (direction & G_IO_IN)
- return SSL_has_pending (ssl);
-
- return FALSE;
-}
-
static GTlsConnectionBaseStatus
g_tls_connection_openssl_read (GTlsConnectionBase *tls,
void *buffer,
@@ -700,7 +687,6 @@ g_tls_connection_openssl_class_init (GTlsConnectionOpensslClass *klass)
base_class->retrieve_peer_certificate =
g_tls_connection_openssl_retrieve_peer_certificate;
base_class->push_io = g_tls_connection_openssl_push_io;
base_class->pop_io = g_tls_connection_openssl_pop_io;
- base_class->check = g_tls_connection_openssl_check;
base_class->read_fn = g_tls_connection_openssl_read;
base_class->write_fn = g_tls_connection_openssl_write;
base_class->close_fn = g_tls_connection_openssl_close;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]