Rinnegatamante / lpp-3ds

Lua Player Plus for 3DS
GNU General Public License v3.0
179 stars 32 forks source link

SSL problem #44

Closed PabloMK7 closed 2 years ago

PabloMK7 commented 7 years ago

Trying to connect to a SSL server randomly causes "Failed creating SSL context". This error persists until you reboot your console. (Tried both with der certificate and without, same result). Code: http://pastebin.com/jCuH4vzb

EDIT: This was caused by not calling Socket.Term() in some code paths, causing too many soc sessions to get initialized.

Rinnegatamante commented 7 years ago

Are you using latest nightly? @ksanislo pushed several patches for SSL connection.

PabloMK7 commented 7 years ago

Bug confirmed in fc3e369

PabloMK7 commented 7 years ago

I've debugged the problem, and I found out that sslccreatecontext returns: D8A0B801 Level: LEVEL_PERMANENT (Program error where retries are not possible.) Summary: SUMMARY_INVALID_STATE (State invalid. Might be initialised, or processing might be out of order.) Module: MODULE_NN_SSL Description: ???? (1) I asked someone for help and told me to add SOC_AddGlobalSocket as stated here. It didn't have any effects tho.

ksanislo commented 7 years ago

@mariohackandglitch Is this happening when running as a .cia build, or as 3dsx? Can you test the other way as well?

PabloMK7 commented 7 years ago

This is happening in .cia build, and it seems to be causing ssl to be in some weird state until the 3ds restarts.