Open Dankr4d opened 5 years ago
Just asyncnet or net as well?
It's just asyncnet! The net modul works fine with OpenSSL 1.0.x. Momently as a workaround I'm working with the net module and threads for my project. Please let me know if I can help in any case to fix this problem!
If you're feeling adventurous you can try digging into the asyncnet source code to try and figure out why this crash happens. It's likely that we are simply calling OpenSSL functions incorrectly and/or need to call some new functions.
Asyncnet crashes with OpenSSL 1.0.x (OpenSSL 1.0.x works fine with net module). When sniffing with wireshark it seems, that no handshake is done but the server/client are already reading/sending data. I've also get an SSL_ERROR_SSL when printing SSLGetError result in asyncnet's getSslError function.
Example Server
Example Client
Compiling and start server:
nim c -d:ssl -d:openssl10 --dynlibOverride:ssl asyncSsl10Bug.nim; LD_LIBRARY_PATH=openssl-1.0.2s ./asyncSsl10Bug
Compiling and start client:nim c -d:ssl -d:openssl10 --dynlibOverride:ssl asyncSsl10BugCli.nim; LD_LIBRARY_PATH=openssl-1.0.2s ./asyncSsl10BugCli
Output server
Output client
Additional Information