[glib-networking] openssl: remove unused function in GTlsConnectionOpenssl



commit 35114d362012358edfbc67673ab4c099af1ab7c7
Author: Fredrik Ternerot <fredrikt axis com>
Date:   Tue Feb 12 10:59:21 2019 +0100

    openssl: remove unused function in GTlsConnectionOpenssl
    
    Remove unused function g_tls_connection_openssl_get_ssl_ctx() from
    GTlsConnectionOpenssl class.

 tls/openssl/gtlsclientconnection-openssl.c | 12 ------------
 tls/openssl/gtlsconnection-openssl.c       |  8 --------
 tls/openssl/gtlsconnection-openssl.h       |  6 ++----
 tls/openssl/gtlsserverconnection-openssl.c | 12 ------------
 4 files changed, 2 insertions(+), 36 deletions(-)
---
diff --git a/tls/openssl/gtlsclientconnection-openssl.c b/tls/openssl/gtlsclientconnection-openssl.c
index 2a16f6e..e72cee4 100644
--- a/tls/openssl/gtlsclientconnection-openssl.c
+++ b/tls/openssl/gtlsclientconnection-openssl.c
@@ -280,17 +280,6 @@ g_tls_client_connection_openssl_get_ssl (GTlsConnectionOpenssl *connection)
   return priv->ssl;
 }
 
-static SSL_CTX *
-g_tls_client_connection_openssl_get_ssl_ctx (GTlsConnectionOpenssl *connection)
-{
-  GTlsClientConnectionOpenssl *client = G_TLS_CLIENT_CONNECTION_OPENSSL (connection);
-  GTlsClientConnectionOpensslPrivate *priv;
-
-  priv = g_tls_client_connection_openssl_get_instance_private (client);
-
-  return priv->ssl_ctx;
-}
-
 static void
 g_tls_client_connection_openssl_class_init (GTlsClientConnectionOpensslClass *klass)
 {
@@ -307,7 +296,6 @@ g_tls_client_connection_openssl_class_init (GTlsClientConnectionOpensslClass *kl
   base_class->complete_handshake = g_tls_client_connection_openssl_complete_handshake;
 
   connection_class->get_ssl = g_tls_client_connection_openssl_get_ssl;
-  connection_class->get_ssl_ctx = g_tls_client_connection_openssl_get_ssl_ctx;
 
   g_object_class_override_property (gobject_class, PROP_VALIDATION_FLAGS, "validation-flags");
   g_object_class_override_property (gobject_class, PROP_SERVER_IDENTITY, "server-identity");
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index 9b4b9b4..622d403 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -620,14 +620,6 @@ g_tls_connection_openssl_get_ssl (GTlsConnectionOpenssl *openssl)
   return G_TLS_CONNECTION_OPENSSL_GET_CLASS (openssl)->get_ssl (openssl);
 }
 
-SSL_CTX *
-g_tls_connection_openssl_get_ssl_ctx (GTlsConnectionOpenssl *openssl)
-{
-  g_return_val_if_fail (G_IS_TLS_CONNECTION_OPENSSL (openssl), NULL);
-
-  return G_TLS_CONNECTION_OPENSSL_GET_CLASS (openssl)->get_ssl_ctx (openssl);
-}
-
 gboolean
 g_tls_connection_openssl_request_certificate (GTlsConnectionOpenssl  *openssl,
                                               GError                **error)
diff --git a/tls/openssl/gtlsconnection-openssl.h b/tls/openssl/gtlsconnection-openssl.h
index 31eeab3..99eff47 100644
--- a/tls/openssl/gtlsconnection-openssl.h
+++ b/tls/openssl/gtlsconnection-openssl.h
@@ -46,8 +46,7 @@ struct _GTlsConnectionOpensslClass
 {
   GTlsConnectionBaseClass parent_class;
 
-  SSL     *(*get_ssl)     (GTlsConnectionOpenssl *connection);
-  SSL_CTX *(*get_ssl_ctx) (GTlsConnectionOpenssl *connection);
+  SSL *(*get_ssl) (GTlsConnectionOpenssl *connection);
 };
 
 struct _GTlsConnectionOpenssl
@@ -57,8 +56,7 @@ struct _GTlsConnectionOpenssl
 
 GType g_tls_connection_openssl_get_type (void) G_GNUC_CONST;
 
-SSL     *g_tls_connection_openssl_get_ssl     (GTlsConnectionOpenssl *connection);
-SSL_CTX *g_tls_connection_openssl_get_ssl_ctx (GTlsConnectionOpenssl *connection);
+SSL *g_tls_connection_openssl_get_ssl (GTlsConnectionOpenssl *connection);
 
 gboolean g_tls_connection_openssl_request_certificate (GTlsConnectionOpenssl  *openssl,
                                                        GError                **error);
diff --git a/tls/openssl/gtlsserverconnection-openssl.c b/tls/openssl/gtlsserverconnection-openssl.c
index e5307de..60f9659 100644
--- a/tls/openssl/gtlsserverconnection-openssl.c
+++ b/tls/openssl/gtlsserverconnection-openssl.c
@@ -168,17 +168,6 @@ g_tls_server_connection_openssl_get_ssl (GTlsConnectionOpenssl *connection)
   return priv->ssl;
 }
 
-static SSL_CTX *
-g_tls_server_connection_openssl_get_ssl_ctx (GTlsConnectionOpenssl *connection)
-{
-  GTlsServerConnectionOpenssl *server = G_TLS_SERVER_CONNECTION_OPENSSL (connection);
-  GTlsServerConnectionOpensslPrivate *priv;
-
-  priv = g_tls_server_connection_openssl_get_instance_private (server);
-
-  return priv->ssl_ctx;
-}
-
 static void
 g_tls_server_connection_openssl_class_init (GTlsServerConnectionOpensslClass *klass)
 {
@@ -193,7 +182,6 @@ g_tls_server_connection_openssl_class_init (GTlsServerConnectionOpensslClass *kl
   base_class->handshake = g_tls_server_connection_openssl_handshake;
 
   connection_class->get_ssl = g_tls_server_connection_openssl_get_ssl;
-  connection_class->get_ssl_ctx = g_tls_server_connection_openssl_get_ssl_ctx;
 
   g_object_class_override_property (gobject_class, PROP_AUTHENTICATION_MODE, "authentication-mode");
 }


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