RV50 Lua SSL/HTTPS issues

I’m having problems writing a Lua script to do HTTPS on my Airlink RV50. Some sites (like Google) seem to work, but others (like httpbin.org) fail during the SSL handshake, giving an error message like:

/root/aleos/usr/readyagent/lua/ssl/https.lua:92: tlsv1 alert internal error

This happens even if I set up the connection manually using the socket library. What can I do to debug this? The LuaSec version seems to be 0.6alpha – is there a way to update to a newer version? Is it possible to get root access on the gateway?

Thanks,
-Adam Haun