[Libwebsockets] SSL Connect Error

Andy Green andy at warmcat.com
Wed Oct 26 13:57:13 CEST 2016


On Wed, 2016-10-26 at 16:36 +0530, techi eth wrote:
> It seems you are right.

Not sure what I was right about.

> Once above error come i am also getting
> LWS_CALLBACK_CLOSED_CLIENT_HTTP & followed
> by LWS_CALLBACK_CLIENT_CONNECTION_ERROR,LWS_CALLBACK_WSI_DESTROY.
> 
> if I wan't to retry again do i need to create context again or i can
> try connecting lws_client_connect_via_info for re-connection. 

Take a look at the test client connection retry and ratelimit stuff.
 You don't need to recook the context.

https://github.com/warmcat/libwebsockets/blob/master/test-server/test-c
lient.c#L112
https://github.com/warmcat/libwebsockets/blob/master/test-server/test-c
lient.c#L389
https://github.com/warmcat/libwebsockets/blob/master/test-server/test-c
lient.c#L639

It's OK to just cut and paste whatever works in the test apps, they are
all licensed CC0 to facilitate that.

-Andy

> Thanks
> 
> On Mon, Oct 17, 2016 at 1:27 PM, Andy Green <andy at warmcat.com> wrote:
> > 
> > 
> > On October 17, 2016 3:45:20 PM GMT+08:00, techi eth <techieth at gmail
> > .com> wrote:
> > >Hi,
> > >
> > >I have observed below error when connecting web socket client to
> > >server.
> > 
> > Which one is using lws?
> > 
> > The lws test server and test client can talk okay?
> > 
> > >ERR: SSL connect error 336122100: error:1408D0F4:SSL
> > >routines:ssl3_get_key_exchange:unexpected message
> > >
> > >Please give me hint what could go wrong.
> > 
> > It seems the ssl negotiation didn't complete.
> > 
> > Maybe the remote peer doesn't support any key exchange protocol the
> > local side allows, openssl on one side or the other too old.  Maybe
> > one side doesn't even support ssl.
> > 
> > You'll have to debug it since you have the symptom.
> > 
> > -Andy
> > 
> > >I am using libwebsocket from master.
> > >
> > >Regards,
> > >Techi
> > >
> > >
> > >----------------------------------------------------------------
> > --------
> > >
> > >_______________________________________________
> > >Libwebsockets mailing list
> > >Libwebsockets at ml.libwebsockets.org
> > >http://libwebsockets.org/mailman/listinfo/libwebsockets
> > 
> > 
> 



More information about the Libwebsockets mailing list