purple_ssl_connect to prevent nslookup

karthik kumar kumarkarthikn at gmail.com
Thu Aug 16 13:42:48 EDT 2012


Thanks Duncan.
I will check the webserver settings and  s_client.
Actually this url is a part of redirect,
I don't know how to use purple libraries for http 302 redirections, so
I m making the first http call, parsing the response header to get the next
url  i.e Location: \(.*\)
This is where the call is not working.

Is there a better way to handle https 302 redirections ?

Thanks
Karthik.



On Thu, Aug 16, 2012 at 3:12 PM, Duncan Berriman <duncan at berrimans.co.uk>wrote:

> Not an issue with pidgin as you have reproduced it with wget.****
>
> ** **
>
> Obviously things on the internet only connect via the ip address, the host
> name is always translated to an ip.****
>
> ** **
>
> Unusual that the connect using ip fails however it is possible the web
> server has been configured to only accept connects which specify the
> hostname (if you understand the http protocol it is passed in the request).
> ****
>
> ** **
>
> You might want to try an openssl s_client –connect hostname:443 and see
> what that gives. ****
>
> ** **
>
> http://www.openssl.org/docs/apps/s_client.html****
>
> ** **
>
> Duncan****
>
> ** **
>
> *From:* devel-bounces at pidgin.im [mailto:devel-bounces at pidgin.im] *On
> Behalf Of *karthik kumar
> *Sent:* 15 August 2012 20:18
> *To:* devel at pidgin.im
> *Subject:* purple_ssl_connect to prevent nslookup****
>
> ** **
>
> Hi, ****
>
>     purple_ssl_connect is resolving the hostname to public ip and then
> tryting to connect. I have one strange url where I have to connect only
> using the hostname but not ip. ****
>
>    ****
>
>  To explain: ****
>
>    wget   'https://hostname/a/b/c/d?e=f'  =>  PASS Result.   ****
>
>    nslookup  hostname   gives me   pub_ip****
>
>    wget  'https://pub_ip/a/b/c/d?e=f'       =>   FAIL Result.****
>
> ** **
>
> The same with pidgin api's****
>
>     purple_ssl_connect( conn, hostname .....)  and purple_ssl_write(
>  /a/b/c/d?e=f  ...)     => FAIL Result.****
>
> ** **
>
> Is there a way I can connect with the hostname itself ? I tried to search
> but couldn't get anything useful. Can I get some help on this ?****
>
> ** **
>
> ** **
>
> Thanks****
>
> Karthik.****
>
>
> --
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean. ****
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20120816/276a69bf/attachment-0002.html>


More information about the Devel mailing list