[glib-networking] gnutls: handle another case of connection-closed-during-handshake
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] gnutls: handle another case of connection-closed-during-handshake
- Date: Tue, 5 Mar 2013 15:27:25 +0000 (UTC)
commit 31fba3063f0d82610891cb77130b7509bede7e34
Author: Dan Winship <danw gnome org>
Date: Tue Mar 5 09:29:55 2013 -0500
gnutls: handle another case of connection-closed-during-handshake
fixes one of the tests with gnutls 3.x
https://bugzilla.gnome.org/show_bug.cgi?id=694812
tls/gnutls/gtlsconnection-gnutls.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 7fc1695..a97031d 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -749,7 +749,13 @@ end_gnutls_io (GTlsConnectionGnutls *gnutls,
#endif
)
{
- if (gnutls->priv->require_close_notify)
+ if (gnutls->priv->handshaking && !gnutls->priv->ever_handshaked)
+ {
+ g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_NOT_TLS,
+ _("Peer failed to perform TLS handshake"));
+ return GNUTLS_E_PULL_ERROR;
+ }
+ else if (gnutls->priv->require_close_notify)
{
g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_EOF,
_("TLS connection closed unexpectedly"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]