View Single Post
Old 06-05-2014, 02:18 AM   #50
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
Here goes. Completely untested, because I'm lazy .

For a K4 & PW1, use the binary in the K5 folder.
Ah, phooey, 1am and nothing else to read . . . .
So I read the source code (for the first time).

The application attempts to be non-blocking while servicing multiple connections.
Only (Open)SSL is used in blocking mode
AND
(Open)SSL is not coded to handle multiple connections in blocking mode (I.E: the single SSL_CTX is not "multiple use").

The (Open)SSL parts of the code should be written using non-blocking mode (and with the appropriate tests and callbacks).
https://www.openssl.org/support/faq.html#PROG10

Translation:
Application can handle multiple channels, on multiple servers, but only one of them can be SSL.
Making more than a single SSL connection at once will lead to strange and wonderful connection errors.
I don't **think** it will segfault, but the connections will be garbage.

Edit: (after seven hours of sleep) - -
Don't anyone panic, this is known to work on the Kindles.
Meanwhile, I will re-read this source code while mind is closer to being "in gear" rather than dreaming.

Last edited by knc1; 06-05-2014 at 08:25 AM.
knc1 is offline   Reply With Quote