Display TLS connection information when connected to a TLS enabled server.

This commit is contained in:
Alexander Færøy 2016-10-16 14:33:25 +02:00
commit c6c2e79537
No known key found for this signature in database
GPG key ID: E15081D5D3C3DB53
7 changed files with 144 additions and 1 deletions

View file

@ -291,5 +291,19 @@ FORMAT_REC fecommon_core_formats[] = {
{ "completion_line", "%#$[10]0 $[!40]1 $2", 3, { 0, 0, 0 } },
{ "completion_footer", "", 0 },
/* ---- */
{ NULL, "TLS", 0 },
{ "tls_ephemeral_key", "EDH Key: {hilight $0} bit {hilight $1}", 2, { 1, 0 } },
{ "tls_ephemeral_key_unavailable", "EDH Key: {error N/A}", 0 },
{ "tls_pubkey", "Public Key: {hilight $0} bit {hilight $1}, valid from {hilight $2} to {hilight $3}", 4, { 1, 0, 0, 0 } },
{ "tls_cert_header", "Certificate Chain:", 0 },
{ "tls_cert_subject_header", " Subject:", 0 },
{ "tls_cert_issuer_header", " Issuer:", 0 },
{ "tls_cert_named_entry", " $[-2]0: {hilight $1}", 2, { 0, 0 } },
{ "tls_pubkey_fingerprint", "Public Key Fingerprint: {hilight $0} ({hilight $1})", 2, { 0, 0 } },
{ "tls_cert_fingerprint", "Certificate Fingerprint: {hilight $0} ({hilight $1})", 2, { 0, 0 } },
{ "tls_protocol_version", "Protocol: {hilight $0} ({hilight $1} bit, {hilight $2})", 3, { 0, 1, 0 } },
{ NULL, NULL, 0 }
};