[glib-networking] Never accept a missing certificate
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking] Never accept a missing certificate
- Date: Mon, 12 Nov 2018 03:03:12 +0000 (UTC)
commit 1ba8c0bffbc27605d7188c16f71a0964d6b49f6f
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Nov 11 21:01:21 2018 -0600
Never accept a missing certificate
If the server doesn't send a certificate, we should wind up failing with
GNUTLS_E_NO_CIPHER_SUITES. Still, let's explicitly check to make sure
it's here, just in case.
tls/gnutls/gtlsconnection-gnutls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 3e1b5a3..3200079 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -1825,7 +1825,7 @@ accept_peer_certificate (GTlsConnectionGnutls *gnutls,
g_assert (g_main_context_is_owner (priv->handshake_context));
- if (G_IS_TLS_CLIENT_CONNECTION (gnutls))
+ if (G_IS_TLS_CLIENT_CONNECTION (gnutls) && priv->peer_certificate != NULL)
{
GTlsCertificateFlags validation_flags;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]