[glib-networking/mcatanzaro/base-rebase: 35/40] base: never accept a missing certificate
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/mcatanzaro/base-rebase: 35/40] base: never accept a missing certificate
- Date: Wed, 8 May 2019 22:13:11 +0000 (UTC)
commit 07dbd12c9e76483ff624e74f1ecc94c6497b6802
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sun Apr 7 16:51:50 2019 -0500
base: never accept a missing certificate
Port 1ba8c0bffbc27605d7188c16f71a0964d6b49f6f
tls/base/gtlsconnection-base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
index 7e46871..984231a 100644
--- a/tls/base/gtlsconnection-base.c
+++ b/tls/base/gtlsconnection-base.c
@@ -1089,9 +1089,10 @@ g_tls_connection_base_accept_peer_certificate (GTlsConnectionBase *tls,
GTlsCertificate *peer_certificate,
GTlsCertificateFlags peer_certificate_errors)
{
+ GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
gboolean accepted = FALSE;
- if (G_IS_TLS_CLIENT_CONNECTION (tls))
+ if (G_IS_TLS_CLIENT_CONNECTION (tls) && priv->peer_certificate)
{
GTlsCertificateFlags validation_flags;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]