Show current TLS certificate

This commit is contained in:
James Booth
2015-11-10 01:20:40 +00:00
parent bee27f4773
commit 9302188a32
9 changed files with 98 additions and 111 deletions

View File

@@ -188,6 +188,28 @@ cons_show_error(const char *const msg, ...)
cons_alert();
}
void
cons_show_tlscert(TLSCertificate *cert)
{
if (!cert) {
return;
}
cons_show("Certificate:");
if (cert->domain) {
cons_show(" Domain : %s", cert->domain);
}
if (cert->organisation) {
cons_show(" Organisation : %s", cert->organisation);
}
if (cert->email) {
cons_show(" Email : %s", cert->email);
}
cons_show(" Fingerprint : %s", cert->fingerprint);
cons_show(" Start : %s", cert->notbefore);
cons_show(" End : %s", cert->notafter);
}
void
cons_show_typing(const char *const barejid)
{

View File

@@ -293,6 +293,7 @@ void cons_inpblock_setting(void);
void cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity);
void cons_show_contact_offline(PContact contact, char *resource, char *status);
void cons_theme_colours(void);
void cons_show_tlscert(TLSCertificate *cert);
// title bar
void title_bar_set_presence(contact_presence_t presence);