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)
{