[Libwebsockets] Websocket SLL Problem

Mattia Tinazzi mattia at life3.it
Wed May 27 12:35:53 CEST 2015


Hi,

i have a problem with SSL support . I used the example certificate files 
but when i try to start a websocket in https i get  this error :

[11912747324:8172] NOTICE: Initial logging level 31
[11912747324:8182] NOTICE: Library version: 1.3 unknown-build-hash
[11912747324:8182] NOTICE: IPV6 not compiled in
[11912747324:8182] NOTICE: libev support not compiled in
[11912747324:8192] INFO:  LWS_MAX_HEADER_LEN: 1024
[11912747324:8192] INFO:  LWS_MAX_PROTOCOLS: 5
[11912747324:8192] INFO:  SPEC_LATEST_SUPPORTED: 13
[11912747324:8192] INFO:  AWAITING_TIMEOUT: 5
[11912747324:8192] INFO:  SYSTEM_RANDOM_FILEPATH: '/dev/urandom'
[11912747324:8202] INFO:  LWS_MAX_ZLIB_CONN_BUFFER: 65536
[11912747324:8212] NOTICE:  static allocation: 4736 + (12 x 30000 fds) = 
364736 bytes
[11912747324:8262] INFO:  LWS_MAX_EXTENSIONS_ACTIVE: 3
[11912747324:9222] NOTICE:  canonical_hostname = Dev_3
[11912747324:9222] NOTICE:  per-conn mem: 192 + 2140 headers + protocol 
rx buf
[11912747324:9222] NOTICE:  Compiled with OpenSSL support
[11912747324:9222] NOTICE:  Using SSL mode
[11912747325:1442] INFO: insert_wsi_socket_into_fds: wsi=00A60B88, 
sock=348, fds pos=0
[11912747325:1452] NOTICE:  Listening on port 9876
[11912747437:6174] INFO: insert_wsi_socket_into_fds: wsi=00A5BB58, 
sock=176, fds pos=1
[11912747437:6174] INFO: inserted SSL accept into fds, trying SSL_accept
[11912747437:6184] DEBUG: SSL_accept failed 2 / 
error:00000002:lib(0):func(0):system lib
[11912747437:6184] INFO: SSL_ERROR_WANT_READ
*[11912747437:6184] ERR: no new_wsi*
[11912747437:6205] DEBUG: accepted new SSL conn
[11912747443:0030] INFO: TIMEDOUT WAITING on 3
[11912747443:0030] DEBUG: close: just_kill_connection
[11912747443:0040] INFO: remove_wsi_socket_from_fds: wsi=00A5BB58, 
sock=176, fds pos=1
[11912747443:0050] DEBUG: not calling back closed

And chrome , for example , says this: WebSocket connection to 
'wss://192.168.0.8:9876/' failed: WebSocket opening handshake was canceled

But when i start Fiddler Web Debugger and enable 'DECRYPT HTTPS TRAFFIC 
' option then websocket connection works correctly.

[11912748170:9318] INFO: insert_wsi_socket_into_fds: wsi=00A5BB58, 
sock=176, fds pos=1
[11912748170:9318] INFO: inserted SSL accept into fds, trying SSL_accept
[11912748170:9328] DEBUG: SSL_accept failed 2 / 
error:00000002:lib(0):func(0):system lib
[11912748170:9338] INFO: SSL_ERROR_WANT_READ
[11912748170:9348] DEBUG: SSL_accept failed 2 / 
error:00000002:lib(0):func(0):system lib
[11912748170:9348] INFO: SSL_ERROR_WANT_READ
[11912748170:9358] DEBUG: accepted new SSL conn
[11912748170:9358] INFO: checking custom-protocol
[11912748170:9368] INFO: prot match 1
[11912748170:9378] INFO: libwebsocket_ensure_user_space: 00A5BB58 
protocol 636E3020
[11912748170:9388] INFO: libwebsocket_ensure_user_space: 00A5BB58 
protocol 636E3020
[11912748170:9388] INFO: libwebsocket_ensure_user_space: 00A5BB58 
protocol pss 12, user_space=10861264
[11912748170:9408] INFO: Allocating RX buffer 2070

Any suggestion ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20150527/eaa40133/attachment.html>


More information about the Libwebsockets mailing list