about summary refs log tree commit diff stats
path: root/src/event
diff options
context:
space:
mode:
Diffstat (limited to 'src/event')
-rw-r--r--src/event/server_events.c15
-rw-r--r--src/event/server_events.h3
2 files changed, 18 insertions, 0 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c
index 160d4472..6c575179 100644
--- a/src/event/server_events.c
+++ b/src/event/server_events.c
@@ -638,3 +638,18 @@ sv_ev_muc_occupant_online(const char * const room, const char * const nick, cons
         occupantswin_occupants(room);
     }
 }
+
+int
+sv_ev_certfail(const char * const errormsg, const char * const certname, const char * const certfp,
+    const char * const notbefore, const char * const notafter)
+{
+    cons_show("");
+    cons_show_error("TLS certficiate verification failed: %s", errormsg);
+    cons_show("  Issuer      : %s", certname);
+    cons_show("  Fingerprint : %s", certfp);
+    cons_show("  Start       : %s", notbefore);
+    cons_show("  End         : %s", notafter);
+    cons_show("");
+
+    return 1;
+}
diff --git a/src/event/server_events.h b/src/event/server_events.h
index 3ef8eae4..e9ada1ce 100644
--- a/src/event/server_events.h
+++ b/src/event/server_events.h
@@ -86,5 +86,8 @@ void sv_ev_muc_occupant_online(const char * const room, const char * const nick,
 void sv_ev_roster_update(const char * const barejid, const char * const name,
     GSList *groups, const char * const subscription, gboolean pending_out);
 void sv_ev_roster_received(void);
+int sv_ev_certfail(const char * const errormsg, const char * const certname, const char * const certfp,
+    const char * const notbefore, const char * const notafter);
+
 
 #endif