[Libwebsockets] openssl connection as client

Ken Atherton katherton at sunedison.com
Wed Apr 30 20:45:06 CEST 2014


We've been using libwebsockets as part of a client application under Debian 5.  We connect using HTTPS as a client to a remote Jetty server running in AWS.   I had been using  source code from 5/4/2012 labeled libwebsockets-8360a47011f6a3eb89c6ef9b593eb4bca935336b.  It works great!
Recently  I had to port our application to Debian 7.  To get it to build I had to upgrade to a newer version of libwebsockets.  I'm currently working with source code from around 4/17/2014 labeled libwebsockets-c11b847fa835eacab725824d130795b663a8e31f.   When I connect to an identical local server using OpenSSL it succeeds.  When I connect to our remote server using CYASSL it succeeds.  When I try to connect to our remote server using OpenSSL  I never get connected - I get a number of retries, then:
[410890:3269] INFO: SSL_connect WANT_... retrying
[410890:3488] INFO: TIMEDOUT WAITING on 8
[410890:3489] DEBUG: close: just_kill_connection
[410890:3491] INFO: remove_wsi_socket_from_fds: wsi=0x30c40, sock=8, fds pos=1
Then the whole process repeats, infinitely.  I added my own debug statement and the warning is SSL_ERROR_WANT_READ.  I also tried source code from libwebsockets-1.23-chrome32-firefox24 and got the same result.
I tested connecting using the openssl tool:  openssl s_client -connect myremoteserver.com:443  and got connected .
There was a similar issue in versions prior to 5/4/2012, but when retries were added in libwebsockets-8360a47011f6a3eb89c6ef9b593eb4bca935336b the issue was resolved.  Now, from the log, the retries can be seen to occur but I can never get past SSL_ERROR_WANT_READ using openssl to connect to our remote server.  Does anyone have any thoughts on further tests that might shed light on the problem?

Ken Atherton
Senior Programmer
(510) 456-7203
E-mail:  katherton at sunedison.com<mailto:katherton at sunedison.com>

600 Clipper Drive
Belmont, CA 94002

[cid:image001.jpg at 01CF647B.4CF1E530]

Confidentiality Statement of SunEdison and its subsidiaries: The contents of this message, together with any attachments, are intended only for the use of the individual or entity to which they are addressed and may contain information that is legally privileged and confidential. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this message in error, please notify the original sender immediately by telephone or by return E-mail and delete this message, along with any attachments, from your computer. No Contract: Regardless of content, this email shall not operate to bind SunEdison or its subsidiaries to any purchase order or contract unless pursuant to a written agreement signed by SunEdison or its subsidiaries expressly permitting the use of email for such purpose.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20140430/e8219837/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2772 bytes
Desc: image001.jpg
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20140430/e8219837/attachment-0001.jpg>

More information about the Libwebsockets mailing list