[Libwebsockets] [libwebsockets] max frame size / rx buffer send limitation (#89)

"Andy Green (林安廸)" andy at warmcat.com
Sun Mar 23 04:09:04 CET 2014


On 23/03/14 03:16, the mail apparently from gaby64 included:
> so its not handling SSL_ERROR_WANT_WRITE correctly
>
> on second attempt to write i get this by using ERR_print_errors_fp
> 25622:error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry:s3_pkt.c:737:
>
> shattereddeveloper.blogspot.ca/2013/02/openssl-and-error1409f07f.html

Wow that's pretty crazy.

I guess OpenSSL had some security thing in mind when requiring even the 
buffer to be the same.

But you are correct, if so, the existing code will break for that with 
OpenSSL.

The reason the code is as it is, is that in an emergency he can tailor 
an appropriate malloc() to whatever the payload size is.  Then at the 
cost of needing enough memory to buffer the worst case, people will stop 
complaining they can't send unreasonable size buffers.

But for SSL, if he unexpectedly can insist to use the same buffer, this 
scheme breaks.

After a little thought I think I can see a good way, since I am awake 
for the day at 03:00 local time I will try it now.

-Andy


> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/warmcat/libwebsockets/issues/89#issuecomment-38361279
>




More information about the Libwebsockets mailing list