X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=ssl_common.c;h=18817137f1e38265ffc4ec3e8828fa7818341e04;hp=35970eb9867a9de5451234c6dfdb47bbdb902408;hb=c3b346083a90acd4dcdfc3881dbcc47a92d1a400;hpb=babd5dc0098b2c1703e1c1395c5262ec293c283e diff --git a/ssl_common.c b/ssl_common.c index 35970eb9..18817137 100644 --- a/ssl_common.c +++ b/ssl_common.c @@ -673,49 +673,6 @@ extern int get_certificate_valid_to_date(char *buffer, size_t buffer_size, const } -/********************************************************************* - * - * Function : host_is_ip_address - * - * Description : Checks whether or not a host is specified by - * IP address. Does not actually validate the - * address. - * - * Parameters : - * 1 : host = The host name to check - * - * Returns : 1 => Yes - * 0 => No - * - *********************************************************************/ -extern int host_is_ip_address(const char *host) -{ - const char *p; - - if (NULL != strstr(host, ":")) - { - /* Assume an IPv6 address. */ - return 1; - } - - for (p = host; *p; p++) - { - if ((*p != '.') && !privoxy_isdigit(*p)) - { - /* Not a dot or digit so it can't be an IPv4 address. */ - return 0; - } - } - - /* - * Host only consists of dots and digits so - * assume that is an IPv4 address. - */ - return 1; - -} - - /********************************************************************* * * Function : enforce_sane_certificate_state