Home » U++ Library support » U++ MT-multithreading and servers » https - how to?
Re: https - how to? [message #9303 is a reply to message #7937] |
Thu, 26 April 2007 09:24 |
WebChaot
Messages: 53 Registered: September 2006 Location: Austria, Vienna
|
Member |
|
|
Hi fallingdutch!
All seems to work ok, but ...
I implemented SSL in httpcli-Demo and in my own program.
In httpcli I allways get an zero return error from ssl socket - but code 200 from http - so all works fine, but I dont know, what I should do with this error.
In my own program on first download all works fine and I get the same error after first try (error: 0 - invalid server response...).
[error] socket(1904) / SSL_read: SSL_ERROR_ZERO_RETURN (6)
[status 200] HTTP/1.1 200 OK
Do you know whats wrong with ssl? Did you have similar responses in past?
Thanks,
WebChaot.
Here the lines I added to httpcli, which results in the error described above:
===========================================
if(sslcontext.IsEmpty())
{
sslcontext.Create(SSLv2_client_method());
sslcontext.VerifyPeer(false);
}
if(!SSLClientSocket(client.socket,sslcontext,client.host,cli ent.port))
{
puts("No SSL");
return;
}
if (!client.socket.IsOpen())
{
puts("No Socket");
return;
}
puts(client.socket.GetInfo(SSLInfoCertSubjectName()).ToStrin g());
String content = client.ExecuteRedirect();
puts("[error] " + Nvl(client.GetError(), "OK (no error)"));
puts(NFormat("[status %d] %s\n", client.GetStatusCode(), client.GetStatusLine()));
===========================================
[Updated on: Thu, 26 April 2007 09:25] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon May 13 14:11:21 CEST 2024
Total time taken to generate the page: 0.01274 seconds
|