Re: [libmicrohttpd] About an HTTPS connection Upgraded

2017-05-07 Thread Nicolas Mora
Le 2017-05-07 à 16:51, Christian Grothoff a écrit : Hmm. Try 'strace' on IO operations (only, i.e. "strace -e trace=network,ipc,desc"). When you 'send' to the Web socket, it should be writing to a socketpair(), followed by MHD 'recv'ing from that socketpair() and then GnuTLS ultimately send'ing

Re: [libmicrohttpd] About an HTTPS connection Upgraded

2017-05-07 Thread Christian Grothoff
On 05/07/2017 10:20 PM, Nicolas Mora wrote: > > Any I retried it without any gnutls call on the MHD_sock and I still > have problems reading and writing the socket, nothing is transmitted, Hmm. Try 'strace' on IO operations (only, i.e. "strace -e trace=network,ipc,desc"). When you 'send' to the

Re: [libmicrohttpd] About an HTTPS connection Upgraded

2017-05-07 Thread Evgeny Grin
Didn't check your code (and your code is not minimal example!), but I suspect that you call MHD_stop_daemon() before you finish working with "upgraded" sockets. You should call MHD_upgrade_action() with MHD_UPGRADE_ACTION_CLOSE for each "upgraded" socket after you finished with socket and call MHD_

Re: [libmicrohttpd] About an HTTPS connection Upgraded

2017-05-07 Thread Nicolas Mora
Le 2017-05-07 à 15:42, Christian Grothoff a écrit : Eh, what is wrong is that you use "gnutls_record_send". MHD will do this for you, you should just use "send/recv", even in HTTPS mode! In fact, your code (short of MHD_start_daemon) can be exactly the same for HTTP and HTTPS. Argh, I tried

Re: [libmicrohttpd] About an HTTPS connection Upgraded

2017-05-07 Thread Christian Grothoff
On 05/07/2017 09:20 PM, Nicolas Mora wrote: > Hello, > > I'm still working on a websocket implementation based on MHD, the non > secure websocket works fine, but the secure websocket doesn't work yet. > > I'm having problems with the socket and the tls session. I get my > inspiration from the tes

[libmicrohttpd] About an HTTPS connection Upgraded

2017-05-07 Thread Nicolas Mora
Hello, I'm still working on a websocket implementation based on MHD, the non secure websocket works fine, but the secure websocket doesn't work yet. I'm having problems with the socket and the tls session. I get my inspiration from the test_upgrade.c file but I can't have a valid tls session