aboutsummaryrefslogtreecommitdiff
path: root/src/IO/tls.c
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2016-07-03 17:36:47 +0000
committercorvid <devnull@localhost>2016-07-03 17:36:47 +0000
commite6d3d297362baa3a88d1e3bfd795f871865f251a (patch)
tree2028adb3e6a93dd45197be32dda46c4616655308 /src/IO/tls.c
parentff74c1460b32c74f0c9afac32bcd480763735447 (diff)
clean up host:port usage, particularly with ipv6
Diffstat (limited to 'src/IO/tls.c')
-rw-r--r--src/IO/tls.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/IO/tls.c b/src/IO/tls.c
index 62e160b1..9ee82b90 100644
--- a/src/IO/tls.c
+++ b/src/IO/tls.c
@@ -946,8 +946,8 @@ static void Tls_connect(int fd, int connkey)
const char *version = mbedtls_ssl_get_version(ssl),
*cipher = mbedtls_ssl_get_ciphersuite(ssl);
- MSG("%s: %s, cipher %s\n", URL_AUTHORITY(conn->url), version,
- cipher);
+ MSG("%s:%d %s, cipher %s\n", URL_AUTHORITY(conn->url),
+ URL_PORT(conn->url), version, cipher);
}
if (srv->cert_status == CERT_STATUS_USER_ACCEPTED ||
(Tls_examine_certificate(conn->ssl, srv) != -1)) {
@@ -1121,8 +1121,9 @@ static void Tls_cert_authorities_print_summary()
for (j = 0; j < servers_len; j++) {
Server_t *s = dList_nth_data(ca->servers, j);
+ bool_t ipv6 = a_Url_host_type(s->hostname) == URL_HOST_IPV6;
- MSG("%s:%d ", s->hostname, s->port);
+ MSG("%s%s%s:%d ", ipv6?"[":"", s->hostname, ipv6?"]":"", s->port);
}
MSG("\n");
}