[glib-networking/mcatanzaro/base-rebase] openssl: clarify the req_mode switch case



commit d07de65a3456d97420d5d412c9407850479ef8e6
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue May 14 20:02:26 2019 -0500

    openssl: clarify the req_mode switch case
    
    This is the same as before, except easier to read.

 tls/openssl/gtlsserverconnection-openssl.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tls/openssl/gtlsserverconnection-openssl.c b/tls/openssl/gtlsserverconnection-openssl.c
index 86a51ab..3c3f363 100644
--- a/tls/openssl/gtlsserverconnection-openssl.c
+++ b/tls/openssl/gtlsserverconnection-openssl.c
@@ -183,9 +183,10 @@ g_tls_server_connection_openssl_prepare_handshake (GTlsConnectionBase  *tls,
   switch (openssl->authentication_mode)
     {
     case G_TLS_AUTHENTICATION_REQUIRED:
-      req_mode = SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
+      req_mode = SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
+      break;
     case G_TLS_AUTHENTICATION_REQUESTED:
-      req_mode |= SSL_VERIFY_PEER;
+      req_mode = SSL_VERIFY_PEER;
       break;
     case G_TLS_AUTHENTICATION_NONE:
     default:


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