[glib-networking] gnutls: minor cleanup



commit c408021018d85c5c3b5c63ea3741d463ccc47901
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Aug 20 16:10:08 2015 +0200

    gnutls: minor cleanup

 tls/gnutls/gtlsconnection-gnutls.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index f5fef2c..08aaad2 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -1277,7 +1277,7 @@ accept_peer_certificate (GTlsConnectionGnutls *gnutls,
                         GTlsCertificate      *peer_certificate,
                         GTlsCertificateFlags  peer_certificate_errors)
 {
-  gboolean accepted;
+  gboolean accepted = FALSE;
 
   if (G_IS_TLS_CLIENT_CONNECTION (gnutls))
     {
@@ -1286,14 +1286,9 @@ accept_peer_certificate (GTlsConnectionGnutls *gnutls,
 
       if ((peer_certificate_errors & validation_flags) == 0)
        accepted = TRUE;
-      else
-       {
-         accepted = g_tls_connection_emit_accept_certificate (G_TLS_CONNECTION (gnutls),
-                                                              peer_certificate,
-                                                              peer_certificate_errors);
-       }
     }
-  else
+
+  if (!accepted)
     {
       accepted = g_tls_connection_emit_accept_certificate (G_TLS_CONNECTION (gnutls),
                                                           peer_certificate,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]