[gnome-network-displays/cc-tmp: 37/80] cc: only print unexpected cert errors
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-network-displays/cc-tmp: 37/80] cc: only print unexpected cert errors
- Date: Fri, 9 Sep 2022 12:03:50 +0000 (UTC)
commit 51fb52624d9810d8f776f1ae9b8e2c3b37d99544
Author: Anupam Kumar <kyteinsky gmail com>
Date: Sat Sep 3 17:02:10 2022 +0530
cc: only print unexpected cert errors
src/cc/cc-comm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/cc/cc-comm.c b/src/cc/cc-comm.c
index 7cfad50..e1a493f 100644
--- a/src/cc/cc-comm.c
+++ b/src/cc/cc-comm.c
@@ -73,7 +73,9 @@ cc_comm_accept_certificate (GTlsClientConnection *conn,
GTlsCertificateFlags errors,
gpointer user_data)
{
-#if 0
+ if (errors & G_TLS_CERTIFICATE_UNKNOWN_CA || errors & G_TLS_CERTIFICATE_BAD_IDENTITY)
+ return TRUE;
+
g_print ("Certificate would have been rejected ( ");
if (errors & G_TLS_CERTIFICATE_UNKNOWN_CA)
g_print ("unknown-ca ");
@@ -88,7 +90,6 @@ cc_comm_accept_certificate (GTlsClientConnection *conn,
if (errors & G_TLS_CERTIFICATE_INSECURE)
g_print ("insecure ");
g_print (") but accepting anyway.\n");
-#endif
return TRUE;
}
@@ -151,7 +152,6 @@ cc_comm_header_read_cb (GObject *source_object,
GAsyncResult *res,
gpointer user_data)
{
-
CcComm *comm = (CcComm *) user_data;
g_autoptr (GError) error = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]