diff options
author | James Booth <boothj5@gmail.com> | 2015-09-22 20:55:41 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-09-22 20:55:41 +0100 |
commit | 74151e6419a606c25b6ea9ad2eed05679f6e8fd9 (patch) | |
tree | ccb086c04b951020514db11752ad6f0b462c70d0 /src/event | |
parent | b24529171f4cef137cf864fde3d8b94e24bffef9 (diff) | |
download | profani-tty-74151e6419a606c25b6ea9ad2eed05679f6e8fd9.tar.gz |
Added TLS cert fail callback
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/server_events.c | 15 | ||||
-rw-r--r-- | src/event/server_events.h | 3 |
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 |