-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sha2 library fails for some reason #64
Comments
If you uninstall the sha2 module everything starts up okay? |
this only occurs when the function is called. |
hmm, okay. I would create and issue on the OpenResty mailing list. First try creating a new app with just an Nginx config and a This is the config, I used, I was unable to reproduce the crash: (You can just put this in a directory and run worker_processes 1;
error_log stderr notice;
daemon off;
events {
worker_connections 1024;
}
http {
server {
listen 8181;
location / {
default_type text/html;
content_by_lua '
local sha2 = require("sha2")
ngx.say(sha2.sha512hex("hello world"))
';
}
}
} |
Also if you are hashing passwords I recommend using bcrypt or scrypt. Here's a bcrypt binding I use in my apps: |
I'll use bcrypt for now, I'll test out that sha2 thing an a little bit. |
I was going to ask on the luabcrypt repo but its got issues disabled, what is your recommended way of installing openssl? Using that thing you sent me the same thing appears:
If you want to explore the error on my system, I'm running Vagrant ( http://vagrantup.com ) so I could send you my current system if you want. I rebuilt my system recently so I can confirm it wasn't that instance of an installation. |
The bcrypt library I linked to has no dependencies. Are you talking about the sha2 library? |
You require openssl for bcrypt http://qs.lc/5pww |
oh, ooops. It's actually just a library I forked. I have no answer for you then. I just install openssl from my distro |
If you are on Debian, try installing libssl-dev first |
how do i compile luabcrypt, i've tried both the fork and original and i get this:
Do I need the lua source? |
try
|
did that already before. https requires luasec, which fails to install because of
|
What distro are you using? Sounds like you need to install libssl-dev (or the equivalent) as @seanlai suggested |
Run this in the folder where you checked out the repo to avoid having LuaRocks make an https request:
|
|
Do you have openssl dev installed? |
openssl-dev doesn't exist, tried doing |
Hey qaisjp, did you try sudo apt-get install libssl-dev. It works for me. If it doesn't work, you should really try asking on StackOverflow. You might have better luck getting help there. |
@seanlai :( |
http://stackoverflow.com/questions/19712859/issue-installing-libssl-for-use-with-bcrypt |
If you're still looking for things to try the bcrypt library I had forked has been updated to use a different library, maybe you can see if that runs: https://github.com/mikejsavage/lua-bcrypt It doesn't appear to use openssl anymore. |
Why oh why.
|
This is why I forked the library, the Makefile included doesn't work on all systems. You can edit the top level Makefile to add |
Okay, sorry you're having so much trouble :) I patched the latest version of lua-bcrypt to use LuaRock's build system instead of make so it should install on your system: Try running this command: luarocks install http://leafo.net/dump/bcrypt-leafo-1.rockspec I'll push this patch upstream if it works for you. |
no problem :) i'll just carry on development without password hashing and fakes passes for now. This is my log, ended up with a different error now:
|
Okay I re-read the build information before it was finished installing, seems it failed somewhere:
|
Cool, so everything is working? |
Nope :(
|
It says it built, you should be able to ignore the warning. |
Then this happens :/ |
@qaisjp Take a look at this change, it might fix your problem: blablacio/luabcrypt@da76b39 |
thanks @blablacio - i'll test it one day. |
bcrypt works all fine and dandy now 🎉 |
sudo luarocks install sha2
The sha2 library works perfectly well in the Lua console
but when trying it in lapis. after doing
screen -r lapis
I typedlapis server
and the regular lapis information shows up (including lua_cache stuff) those stuff disappeared.I can then CTRL+C out of there and proceed to leave my screen.
The text was updated successfully, but these errors were encountered: