diff options
author | corvid <devnull@localhost> | 2016-07-03 17:36:47 +0000 |
---|---|---|
committer | corvid <devnull@localhost> | 2016-07-03 17:36:47 +0000 |
commit | e6d3d297362baa3a88d1e3bfd795f871865f251a (patch) | |
tree | 2028adb3e6a93dd45197be32dda46c4616655308 /src/IO | |
parent | ff74c1460b32c74f0c9afac32bcd480763735447 (diff) |
clean up host:port usage, particularly with ipv6
Diffstat (limited to 'src/IO')
-rw-r--r-- | src/IO/http.c | 2 | ||||
-rw-r--r-- | src/IO/tls.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/IO/http.c b/src/IO/http.c index bc8489c9..d8fcf018 100644 --- a/src/IO/http.c +++ b/src/IO/http.c @@ -570,7 +570,7 @@ static void Http_connect_socket(ChainLink *Info) memcpy(&sin6->sin6_addr, dh->data, dh->alen); inet_ntop(dh->af, dh->data, buf, sizeof(buf)); if (a_Web_valid(S->web) && (S->web->flags & WEB_RootUrl)) - MSG("Connecting to %s:%u\n", buf, S->connect_port); + MSG("Connecting to [%s]:%u\n", buf, S->connect_port); break; } #endif 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"); } |