lipp / lua-websockets

Websockets for Lua.
http://lipp.github.com/lua-websockets/
MIT License
396 stars 113 forks source link

Use external provided SHA1 hashing #38

Closed ntd closed 9 years ago

ntd commented 10 years ago

LuaCrypto already provides SHA1 hashing at raw C speed. It is based on openssl though.

If interested I can take the burden of the integration into lua-websocket.

lipp commented 10 years ago

Unforunately this is a bit of a problem. lua-websockets is used on embedded systems where we can not afford to have openssl "installed" (in terms of size). It just does not fit on the device :(

What we could do is trying to load the ssl module, use the sha1 implementation provided OR fallback to use the "naive" Lua impl.

The handshake and sha1 happens just once per connection, so it is no biggy if you don't have many many connections.

ntd commented 10 years ago

Ok, I made a new pull request addressing this issue. Not sure it was required but... just let me know.