Officially deprecate xmpp_conn_disable_tls()
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
22
src/conn.c
22
src/conn.c
@@ -799,7 +799,8 @@ int xmpp_connect_component(xmpp_conn_t *conn,
|
||||
return XMPP_EINVOP;
|
||||
|
||||
/* XEP-0114 does not support TLS */
|
||||
xmpp_conn_disable_tls(conn);
|
||||
(void)xmpp_conn_set_flags(conn, xmpp_conn_get_flags(conn) |
|
||||
XMPP_CONN_FLAG_DISABLE_TLS);
|
||||
if (!conn->tls_disabled) {
|
||||
strophe_error(conn->ctx, "conn",
|
||||
"Failed to disable TLS. "
|
||||
@@ -1203,25 +1204,6 @@ int xmpp_conn_set_flags(xmpp_conn_t *conn, long flags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Disable TLS for this connection, called by users of the library.
|
||||
* Occasionally a server will be misconfigured to send the starttls
|
||||
* feature, but will not support the handshake.
|
||||
*
|
||||
* @param conn a Strophe connection object
|
||||
*
|
||||
* @note this function is deprecated
|
||||
* @see xmpp_conn_set_flags()
|
||||
*
|
||||
* @ingroup Connections
|
||||
*/
|
||||
void xmpp_conn_disable_tls(xmpp_conn_t *conn)
|
||||
{
|
||||
long flags = xmpp_conn_get_flags(conn);
|
||||
|
||||
flags |= XMPP_CONN_FLAG_DISABLE_TLS;
|
||||
(void)xmpp_conn_set_flags(conn, flags);
|
||||
}
|
||||
|
||||
/** Return whether TLS session is established or not.
|
||||
*
|
||||
* @return TRUE if TLS session is established and FALSE otherwise
|
||||
|
||||
@@ -255,3 +255,22 @@ void xmpp_conn_set_keepalive(xmpp_conn_t *conn, int timeout, int interval)
|
||||
conn->ka_count = 0;
|
||||
xmpp_conn_set_sockopt_callback(conn, xmpp_sockopt_cb_keepalive);
|
||||
}
|
||||
|
||||
/** Disable TLS for this connection, called by users of the library.
|
||||
* Occasionally a server will be misconfigured to send the starttls
|
||||
* feature, but will not support the handshake.
|
||||
*
|
||||
* @param conn a Strophe connection object
|
||||
*
|
||||
* @note this function is deprecated
|
||||
* @see xmpp_conn_set_flags()
|
||||
*
|
||||
* @ingroup Deprecated
|
||||
*/
|
||||
void xmpp_conn_disable_tls(xmpp_conn_t *conn)
|
||||
{
|
||||
long flags = xmpp_conn_get_flags(conn);
|
||||
|
||||
flags |= XMPP_CONN_FLAG_DISABLE_TLS;
|
||||
(void)xmpp_conn_set_flags(conn, flags);
|
||||
}
|
||||
|
||||
@@ -382,7 +382,6 @@ char *xmpp_conn_cert_xmppaddr(xmpp_conn_t *conn, unsigned int n);
|
||||
const char *xmpp_conn_get_pass(const xmpp_conn_t *conn);
|
||||
void xmpp_conn_set_pass(xmpp_conn_t *conn, const char *pass);
|
||||
xmpp_ctx_t *xmpp_conn_get_context(xmpp_conn_t *conn);
|
||||
void xmpp_conn_disable_tls(xmpp_conn_t *conn);
|
||||
int xmpp_conn_is_secured(xmpp_conn_t *conn);
|
||||
void xmpp_conn_set_sockopt_callback(xmpp_conn_t *conn,
|
||||
xmpp_sockopt_callback callback);
|
||||
@@ -743,6 +742,8 @@ void xmpp_debug_verbose(
|
||||
|
||||
XMPP_DEPRECATED(xmpp_conn_set_sockopt_callback)
|
||||
void xmpp_conn_set_keepalive(xmpp_conn_t *conn, int timeout, int interval);
|
||||
XMPP_DEPRECATED(xmpp_conn_set_flags)
|
||||
void xmpp_conn_disable_tls(xmpp_conn_t *conn);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user