1 diff --git a/src/conn.c b/src/conn.c
2 index d72386f..e4f0a39 100644
5 @@ -742,6 +742,11 @@ void xmpp_conn_disable_tls(xmpp_conn_t * const conn)
6 conn->tls_disabled = 1;
9 +int xmpp_conn_is_secured(xmpp_conn_t * const conn)
11 + return conn->secured == 1 && conn->tls_failed == 0 ? 1 : 0;
14 static void _log_open_tag(xmpp_conn_t *conn, char **attrs)
17 diff --git a/strophe.h b/strophe.h
18 index 80a5390..64b2352 100644
21 @@ -215,6 +215,7 @@ const char *xmpp_conn_get_pass(const xmpp_conn_t * const conn);
22 void xmpp_conn_set_pass(xmpp_conn_t * const conn, const char * const pass);
23 xmpp_ctx_t* xmpp_conn_get_context(xmpp_conn_t * const conn);
24 void xmpp_conn_disable_tls(xmpp_conn_t * const conn);
25 +int xmpp_conn_is_secured(xmpp_conn_t * const conn);
27 int xmpp_connect_client(xmpp_conn_t * const conn,
28 const char * const altdomain,