version 1.116, 2014/03/30 22:39:42 |
version 1.117, 2014/03/30 22:40:38 |
|
|
|
|
#ifndef SMALL |
#ifndef SMALL |
if (ishttpsurl) { |
if (ishttpsurl) { |
|
union { struct in_addr ip4; struct in6_addr ip6; } addrbuf; |
|
|
if (proxyenv && sslpath) { |
if (proxyenv && sslpath) { |
ishttpsurl = 0; |
ishttpsurl = 0; |
proxyurl = NULL; |
proxyurl = NULL; |
|
|
if (SSL_set_fd(ssl, s) == 0) { |
if (SSL_set_fd(ssl, s) == 0) { |
ERR_print_errors_fp(ttyout); |
ERR_print_errors_fp(ttyout); |
goto cleanup_url_get; |
goto cleanup_url_get; |
|
} |
|
/* |
|
* RFC4366 (SNI): Literal IPv4 and IPv6 addresses are not |
|
* permitted in "HostName". |
|
*/ |
|
if (inet_pton(AF_INET, host, &addrbuf) != 1 && |
|
inet_pton(AF_INET6, host, &addrbuf) != 1) { |
|
if (SSL_set_tlsext_host_name(ssl, host) == 0) { |
|
ERR_print_errors_fp(ttyout); |
|
goto cleanup_url_get; |
|
} |
} |
} |
if (SSL_connect(ssl) <= 0) { |
if (SSL_connect(ssl) <= 0) { |
ERR_print_errors_fp(ttyout); |
ERR_print_errors_fp(ttyout); |