[glib-networking: 95/129] Allow to build with openssl 0.9.8



commit f2d2d1f665c5849ad5247576adfa00638a5a3d97
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Wed Feb 14 13:24:15 2018 +0100

    Allow to build with openssl 0.9.8
    
    This is the version supported by sles 11

 tls/openssl/gtlsclientconnection-openssl.c | 6 ++++--
 tls/openssl/gtlsserverconnection-openssl.c | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/tls/openssl/gtlsclientconnection-openssl.c b/tls/openssl/gtlsclientconnection-openssl.c
index 9287bfd..a71ac2f 100644
--- a/tls/openssl/gtlsclientconnection-openssl.c
+++ b/tls/openssl/gtlsclientconnection-openssl.c
@@ -487,10 +487,12 @@ g_tls_client_connection_openssl_initable_init (GInitable       *initable,
   /* Only TLS 1.2 or higher */
   options = SSL_OP_NO_TICKET |
             SSL_OP_NO_COMPRESSION |
+#ifdef SSL_OP_NO_TLSv1_1
+            SSL_OP_NO_TLSv1_1 |
+#endif
             SSL_OP_NO_SSLv2 |
             SSL_OP_NO_SSLv3 |
-            SSL_OP_NO_TLSv1 |
-            SSL_OP_NO_TLSv1_1;
+            SSL_OP_NO_TLSv1;
   SSL_CTX_set_options (priv->ssl_ctx, options);
 
   SSL_CTX_clear_options (priv->ssl_ctx, SSL_OP_LEGACY_SERVER_CONNECT);
diff --git a/tls/openssl/gtlsserverconnection-openssl.c b/tls/openssl/gtlsserverconnection-openssl.c
index 4fc22bd..8b595ff 100644
--- a/tls/openssl/gtlsserverconnection-openssl.c
+++ b/tls/openssl/gtlsserverconnection-openssl.c
@@ -297,10 +297,12 @@ g_tls_server_connection_openssl_initable_init (GInitable       *initable,
             SSL_OP_CIPHER_SERVER_PREFERENCE |
             SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION |
             SSL_OP_SINGLE_ECDH_USE |
+#ifdef SSL_OP_NO_TLSv1_1
+            SSL_OP_NO_TLSv1_1 |
+#endif
             SSL_OP_NO_SSLv2 |
             SSL_OP_NO_SSLv3 |
-            SSL_OP_NO_TLSv1 |
-            SSL_OP_NO_TLSv1_1;
+            SSL_OP_NO_TLSv1;
 
 #if OPENSSL_VERSION_NUMBER >= 0x10200000L && !defined (LIBRESSL_VERSION_NUMBER)
   options |= SSL_OP_NO_RENEGOTIATION;


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