luasec crashes corona?

X-Post from the other forum because I think this is the appropriate place…

My game has an authentication server that creates the tokens used for the rest of the game calls. This auth server uses SSL for communication. 

My first issue is I cant get Corona to recognize my cert file. I put it in the root of my project, but when my params look like this…

  local params =

  {

    mode = “client”,

    protocol = “sslv3”,

    cafile = “cert.cer”,

    verify = “peer”,

    options = “all”,

  }

I get error…

Failed to establish SSL with: localhost:3336 Error: error loading CA locations (No such file or directory)

Anyway, so I tried changing the verify to none, and now it outright crashes Corona Simulator.

(By the way this is a mobile app for an already established PC game, so I know the auth server I wrote works fine)

Here is the full code…

function attempt\_auth(username, password)   print("starting auth to " .. auth\_server\_host)   local conn = socket.tcp()   local result, error = conn:connect( auth\_server\_host, auth\_server\_port )   if not result then     print( "Failed to connect to: " .. auth\_server\_host .. ":" .. tostring( auth\_server\_port ) .. " Error: " .. error )     return   end   local params =   {     mode = "client",     protocol = "sslv3",     verify = "none",     options = "all",   }   conn, error = plugin\_luasec\_ssl.wrap(conn, params)   if not conn then     print( "Failed to establish SSL with: " .. auth\_server\_host .. ":" .. tostring( auth\_server\_port ) .. " Error: " .. error)     return   end   conn:dohandshake()   client:send("AUTH " .. username)   client:send("PASS " .. password)   client:send("AUTH")   local line, err = conn:receive()   print(err or line)   conn:close() end