diff options
Diffstat (limited to 'WWW/Library')
-rw-r--r-- | WWW/Library/Implementation/HTTCP.c | 10 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTTP.c | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/WWW/Library/Implementation/HTTCP.c b/WWW/Library/Implementation/HTTCP.c index 8add800c..01b52674 100644 --- a/WWW/Library/Implementation/HTTCP.c +++ b/WWW/Library/Implementation/HTTCP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTCP.c,v 1.122 2012/11/13 10:49:38 tom Exp $ + * $LynxId: HTTCP.c,v 1.123 2012/11/13 21:35:01 tom Exp $ * * Generic Communication Code HTTCP.c * ========================== @@ -464,9 +464,9 @@ static unsigned read_hostent(int fd, char *buffer, size_t length) unsigned have = read_bytes(fd, buffer, length); if (have) { - LYNX_HOSTENT *data = (LYNX_HOSTENT *) buffer; + LYNX_HOSTENT *data = (LYNX_HOSTENT *) (void *) buffer; char *next_char = (char *) data + sizeof(*data); - char **next_ptr = (char **) next_char; + char **next_ptr = (char **) (void *) next_char; long offset = 0; int n; int num_addrs = 0; @@ -572,13 +572,13 @@ static size_t fill_rehostent(void **rehostent, outofmem(__FILE__, "fill_rehostent"); *rehostent = result; - data = (LYNX_HOSTENT *) result; + data = (LYNX_HOSTENT *) (void *) result; data->h_addrtype = phost->h_addrtype; data->h_length = phost->h_length; p_next_char = result + sizeof(LYNX_HOSTENT); - p_next_charptr = (char **) p_next_char; + p_next_charptr = (char **) (void *) p_next_char; if (phost->h_addr_list) p_next_char += (size_t) (num_addrs + 1) * sizeof(phost->h_addr_list[0]); if (phost->h_aliases) diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index b265e11e..0a8f7411 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTTP.c,v 1.125 2012/11/08 09:37:42 Jamie.Strandboge Exp $ + * $LynxId: HTTP.c,v 1.126 2012/11/13 22:49:46 tom Exp $ * * HyperText Tranfer Protocol - Client implementation HTTP.c * ========================== @@ -710,7 +710,12 @@ static int HTLoadHTTP(const char *arg, /* get host we're connecting to */ ssl_host = HTParse(url, "", PARSE_HOST); ssl_host = StripIpv6Brackets(ssl_host); -#if SSLEAY_VERSION_NUMBER >= 0x0900 +#if defined(USE_GNUTLS_FUNCS) + ret = gnutls_server_name_set(handle->gnutls_state, + GNUTLS_NAME_DNS, + ssl_host, strlen(ssl_host)); + CTRACE((tfp, "...called gnutls_server_name_set(%s) ->%d\n", ssl_host, ret)); +#elif SSLEAY_VERSION_NUMBER >= 0x0900 #ifndef USE_NSS_COMPAT_INCL if (!try_tls) { handle->options |= SSL_OP_NO_TLSv1; |