Changeset 5eab9260 for lib/ssl_openssl.c


Ignore:
Timestamp:
2018-09-09T22:04:41Z (3 years ago)
Author:
Christopher Brannon <chris@…>
Branches:
master
Children:
67f4cfe
Parents:
37437f2
git-author:
Christopher Brannon <chris@…> (09-09-18 21:45:10)
git-committer:
Christopher Brannon <chris@…> (09-09-18 22:04:41)
Message:

SSL: correctly handle hostnames starting with a digit when SNI is needed.

I noticed that I was unable to connect to a host with bitlbee.
Tracking it down, I found that the problem was that the host needed SNI
but bitlbee wasn't trying to use it. The hostname started with a digit,
so bitlbee was assuming that it was an IP address.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/ssl_openssl.c

    r37437f2 r5eab9260  
    167167        SSL_set_fd(conn->ssl, conn->fd);
    168168
    169         if (conn->hostname && !g_ascii_isdigit(conn->hostname[0])) {
     169        if (conn->hostname && !g_hostname_is_ip_address(conn->hostname)) {
    170170                SSL_set_tlsext_host_name(conn->ssl, conn->hostname);
    171171        }
Note: See TracChangeset for help on using the changeset viewer.