diff options
author | Mike Ruprecht <cmaiku@gmail.com> | 2016-01-31 00:52:24 -0600 |
---|---|---|
committer | Mike Ruprecht <cmaiku@gmail.com> | 2016-01-31 00:52:24 -0600 |
commit | 02d4dbcedb0631bdd2e34b0a1a47ec9a2782080d (patch) | |
tree | 32206ea19cf46604550658821c50dd9b41c63eb9 | |
parent | 767f827f7e47e5e629ec02d4cc3ec52406b04bc1 (diff) | |
download | pidgin-02d4dbcedb0631bdd2e34b0a1a47ec9a2782080d.tar.gz |
Remove unused SslOps code from sslconn.[ch]
Now that the new TLS Certificate API is being used and the plugins
that use the old SslOps are no longer around, this code can be
removed. This patch does just that.
-rw-r--r-- | libpurple/sslconn.c | 13 | ||||
-rw-r--r-- | libpurple/sslconn.h | 74 |
2 files changed, 0 insertions, 87 deletions
diff --git a/libpurple/sslconn.c b/libpurple/sslconn.c index a838b2c3cc..fbf055cdbf 100644 --- a/libpurple/sslconn.c +++ b/libpurple/sslconn.c @@ -29,7 +29,6 @@ #include "tls-certificate.h" static gboolean _ssl_initialized = FALSE; -static PurpleSslOps *_ssl_ops = NULL; static gboolean ssl_init(void) @@ -376,18 +375,6 @@ purple_ssl_get_peer_certificates(PurpleSslConnection *gsc) } void -purple_ssl_set_ops(PurpleSslOps *ops) -{ - _ssl_ops = ops; -} - -PurpleSslOps * -purple_ssl_get_ops(void) -{ - return _ssl_ops; -} - -void purple_ssl_init(void) { /* Although purple_ssl_is_supported will do the initialization on diff --git a/libpurple/sslconn.h b/libpurple/sslconn.h index d554b0b88d..f5e6f9f428 100644 --- a/libpurple/sslconn.h +++ b/libpurple/sslconn.h @@ -46,7 +46,6 @@ typedef enum #define PURPLE_SSL_DEFAULT_PORT 443 typedef struct _PurpleSslConnection PurpleSslConnection; -typedef struct _PurpleSslOps PurpleSslOps; typedef void (*PurpleSslInputFunction)(gpointer, PurpleSslConnection *, PurpleInputCondition); @@ -91,62 +90,6 @@ struct _PurpleSslConnection void *private_data; }; -/** - * PurpleSslOps: - * @init: Initializes the SSL system provided. See purple_ssl_init(). - * <sbr/>Returns: %TRUE if initialization succeeded - * @uninit: Unloads the SSL system. Inverse of PurpleSslOps::init. - * See purple_ssl_uninit(). - * @connectfunc: Sets up the SSL connection for a #PurpleSslConnection once the - * TCP connection has been established. See purple_ssl_connect(). - * @close: Destroys the internal data of the SSL connection provided. Freeing - * @gsc itself is left to purple_ssl_close(). - * @read: Reads data from a connection (like POSIX read()). - * See purple_ssl_read(). - * <sbr/>@gsc: Connection context - * <sbr/>@data: Pointer to buffer to drop data into - * <sbr/>@len: Maximum number of bytes to read - * <sbr/>Returns: Number of bytes actually written into @data - * (which may be less than @len), or <0 on error - * @write: Writes data to a connection (like POSIX send()). - * See purple_ssl_write(). - * <sbr/>@gsc: Connection context - * <sbr/>@data: Data buffer to send data from - * <sbr/>@len: Number of bytes to send from buffer - * <sbr/>Returns: The number of bytes written to @data (may be less than - * @len) or <0 on error - * @get_peer_certificates: Obtains the certificate chain provided by the peer. - * See #PurpleCertificate. - * <sbr/>@gsc: Connection context - * <sbr/>Returns: A newly allocated list containing the - * certificates the peer provided. - * - * SSL implementation operations structure. - * - * Every SSL implementation must provide all of these and register it via - * purple_ssl_set_ops(). - * These should not be called directly! Instead, use the purple_ssl_* functions. - */ -struct _PurpleSslOps -{ - gboolean (*init)(void); - void (*uninit)(void); - void (*connectfunc)(PurpleSslConnection *gsc); - void (*close)(PurpleSslConnection *gsc); - size_t (*read)(PurpleSslConnection *gsc, void *data, size_t len); - size_t (*write)(PurpleSslConnection *gsc, const void *data, size_t len); - - /* TODO Decide whether the ordering of certificates in this list can be - guaranteed. */ - GList * (* get_peer_certificates)(PurpleSslConnection * gsc); - - /*< private >*/ - void (*_purple_reserved1)(void); - void (*_purple_reserved2)(void); - void (*_purple_reserved3)(void); - void (*_purple_reserved4)(void); -}; - G_BEGIN_DECLS /**************************************************************************/ @@ -301,23 +244,6 @@ GList * purple_ssl_get_peer_certificates(PurpleSslConnection *gsc); /**************************************************************************/ /** - * purple_ssl_set_ops: - * @ops: The SSL operations structure to assign. - * - * Sets the current SSL operations structure. - */ -void purple_ssl_set_ops(PurpleSslOps *ops); - -/** - * purple_ssl_get_ops: - * - * Returns the current SSL operations structure. - * - * Returns: The SSL operations structure. - */ -PurpleSslOps *purple_ssl_get_ops(void); - -/** * purple_ssl_init: * * Initializes the SSL subsystem. |