Re: WSAEWOULDBLOCK versus WSAECONNREFUSED

2009-08-23 Thread Md Lazreg
Hello, I have a Windows client that tries to connect to an SSL server using the following code : int status = ::connect( m_sock_fd,(sockaddr *)m_addr,sizeof(m_addr)); if (status == 0) { return true; } else { if (WSAGetLastError()== WSAEWOULDBLOCK)

remove

2009-08-23 Thread 思叶王

Re: ECDHE help needed, please

2009-08-23 Thread Dr. Stephen Henson
On Sat, Aug 22, 2009, Michael D wrote: Thank you for your reply. If I understand correctly, by specifying the 'nocert' option when starting s_server, I am limiting the cipher suites to those without certificates. Otherwise I need to create a certificate and cipher suites that require

WSAEWOULDBLOCK versus WSAECONNREFUSED

2009-08-23 Thread Md Lazreg
Hello, I have a Windows client that tries to connect to an SSL server using the following code : int status = ::connect( m_sock_fd,(sockaddr *)m_addr,sizeof(m_addr)); if (status == 0) { return true; } else { if (WSAGetLastError()== WSAEWOULDBLOCK)

cURL, paypal, and .cer files

2009-08-23 Thread btate
I'm trying to integrate with paypal's payflow gateway via cURL. I can't for the life of me get their certificates right and neither paypal or verisign seem to have any idea how to do it. So I'm going to ask here. I basically have a bunch of .cer files that are necessary to connect to

Re: WSAEWOULDBLOCK versus WSAECONNREFUSED

2009-08-23 Thread Ger Hobbelt
Since you use a nonblocking connect, you're essentially telling the software you want instant return. Which is what you get. Given that a TCP connection takes a little time (three network travels at least), that's definitely more time than you wish to wait given your nonblocking intent, so the IP

Re: WSAEWOULDBLOCK versus WSAECONNREFUSED

2009-08-23 Thread Md Lazreg
Thank you Ger for your reply. It is true that by using a nonblocking connect I want an instant answer but most importantly I want a correct answer. Using the same code under UNIX I get two instant correct answers: ECONNREFUSED [If my SSL server is down] EINPROGRESS [If my SSL server is

Re: WSAEWOULDBLOCK versus WSAECONNREFUSED

2009-08-23 Thread Ger Hobbelt
Probably the difference is due to timing; to get the connection refused response, the client needs to at least transmit a packet and either never see a response (timing out) or receive a RST or (in some cases) an ICMP host-unreachable packet. Any way, the minimum time required to give you the

Re: cURL, paypal, and .cer files

2009-08-23 Thread Crypto Sal
On 08/20/2009 10:25 PM, btate wrote: I'm trying to integrate with paypal's payflow gateway via cURL. I can't for the life of me get their certificates right and neither paypal or verisign seem to have any idea how to do it. So I'm going to ask here. I basically have a bunch of .cer files that

Re: WSAEWOULDBLOCK versus WSAECONNREFUSED

2009-08-23 Thread Md Lazreg
Here is what MSDN says: http://msdn.microsoft.com/en-us/library/ms737625%28VS.85%29.aspx With a nonblocking socket, the connection attempt cannot be completed immediately. In this case, *connect* will return SOCKET_ERROR, and * WSAGetLastError* will return

RE: WSAEWOULDBLOCK versus WSAECONNREFUSED

2009-08-23 Thread David Schwartz
Md Lazreg wrote: When my SSL server is up and running everything works as expected. When my SSL server is down, my client times out in 20 seconds because WSAGetLastError() returns WSAEWOULDBLOCK even when my server is not listening! I expect WSAGetLastError() to return WSAECONNREFUSED when