Last active
December 29, 2017 17:03
-
-
Save R4wm/a0213024271f9979b8029ff5aedc3beb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/git | |
git clone https://github.com/bungle/lua-resty-nettle.git | |
git clone https://github.com/bungle/lua-resty-random | |
git clone https://github.com/r4wm/ectoken | |
cd ~/Downloads | |
wget https://openresty.org/download/openresty-1.11.2.5.tar.gz | |
wget https://www.openssl.org/source/openssl-1.0.2n.tar.gz | |
wget https://ftp.gnu.org/gnu/nettle/nettle-3.4.tar.gz | |
#make install openssl and nettle | |
#TODO post errors if not new opensll and nettle | |
cp ectoken/lua-ectoken/resty/ectoken.lua /usr/local/openresty/site/lualib/ectoken.lua | |
/etc/init.d/nginx stop | |
$START OPENRESTY | |
## NGINX TEST BLOCK ## | |
location /random { | |
access_by_lua ' | |
local ectoken = require "ectoken" | |
local en = ectoken.encrypt("something", "something") | |
ngx.say(en) | |
local de = ectoken.decrypt("something", en) | |
ngx.say(de) | |
ngx.say("end lua-ectoken demo") | |
--end | |
'; | |
include uwsgi_params; | |
uwsgi_pass unix:/tmp/cas_core.sock; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment