[glib-networking] openssl: Fix compiler warning for GTlsClientConnection



commit 25306753da35d55899aa396cd52150249b0d8d84
Author: Fredrik Ternerot <fredrikt axis com>
Date:   Tue Feb 12 10:20:04 2019 +0100

    openssl: Fix compiler warning for GTlsClientConnection
    
    Fix compiler warning produced by -Wincompatible-pointer-types. Type cast
    is needed for GEN_SESSION_CB since it has different prototype in
    different OpenSSL versions (const differs).

 tls/openssl/gtlsclientconnection-openssl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/tls/openssl/gtlsclientconnection-openssl.c b/tls/openssl/gtlsclientconnection-openssl.c
index e72cee4..70e26a0 100644
--- a/tls/openssl/gtlsclientconnection-openssl.c
+++ b/tls/openssl/gtlsclientconnection-openssl.c
@@ -515,7 +515,8 @@ g_tls_client_connection_openssl_initable_init (GInitable       *initable,
     }
 #endif
 
-  SSL_CTX_set_generate_session_id (priv->ssl_ctx, generate_session_id);
+  SSL_CTX_set_generate_session_id (priv->ssl_ctx, (GEN_SESSION_CB)generate_session_id);
+
   SSL_CTX_add_session (priv->ssl_ctx, priv->session);
 
   SSL_CTX_set_client_cert_cb (priv->ssl_ctx, retrieve_certificate);


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