about summary refs log tree commit diff stats
path: root/src/xmpp/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp/connection.c')
-rw-r--r--src/xmpp/connection.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c
index 27711a4c..2986b0bc 100644
--- a/src/xmpp/connection.c
+++ b/src/xmpp/connection.c
@@ -392,8 +392,24 @@ _connection_certfail_cb(const char *const certname, const char *const certfp,
 {
     return sv_ev_certfail(errormsg, certname, certfp, notbefore, notafter);
 }
+
+char*
+jabber_get_tls_peer_cert(void)
+{
+    return xmpp_conn_tls_peer_cert(jabber_conn.conn);
+}
 #endif
 
+gboolean
+jabber_conn_is_secured(void)
+{
+    if (jabber_conn.conn_status == JABBER_CONNECTED) {
+        return xmpp_conn_is_secured(jabber_conn.conn) == 0 ? FALSE : TRUE;
+    } else {
+        return FALSE;
+    }
+}
+
 static jabber_conn_status_t
 _jabber_connect(const char *const fulljid, const char *const passwd,
     const char *const altdomain, int port, const char *const tls_policy)