zhaozg / lua-openssl

Openssl binding for Lua
https://zhaozg.github.io/lua-openssl/index.html
Other
274 stars 116 forks source link

return table #1

Closed dvv closed 13 years ago

dvv commented 13 years ago

Hi!

Excellent project, many thanks! Wonder if you could make it not go to _G and return table of functions? Or, if this is incompatible, to do both.

TIA, --Vladimir

zhaozg commented 13 years ago

accept it, and i will fix it later.

zhaozg commented 13 years ago

And some feature will be add when next commit.

zhaozg commented 13 years ago

This has been imp.

dvv commented 13 years ago

It stopped building:


make[1]: Entering directory `/home/dvv/LUA/modules/server/build/lua-openssl'
gcc -c -I/home/dvv/LUA/modules/server/build/luvit/deps/luajit/src -o src/auxiliar.o src/auxiliar.c
gcc -c -I/home/dvv/LUA/modules/server/build/luvit/deps/luajit/src -o src/bio.o src/bio.c
gcc -c -I/home/dvv/LUA/modules/server/build/luvit/deps/luajit/src -o src/cipher.o src/cipher.c
gcc -c -I/home/dvv/LUA/modules/server/build/luvit/deps/luajit/src -o src/crl.o src/crl.c
gcc -c -I/home/dvv/LUA/modules/server/build/luvit/deps/luajit/src -o src/csr.o src/csr.c
src/csr.c: In function ‘openssl_csr_sign’:
src/csr.c:535:12: error: expected expression before ‘CONF_VALUE’
src/csr.c:535:25: error: ‘conf’ undeclared (first use in this function)
src/csr.c:535:25: note: each undeclared identifier is reported only once for each function it appears in
src/csr.c:542:11: error: expected expression before ‘CONF_VALUE’
src/csr.c:542:11: error: expected expression before ‘)’ token
src/csr.c:550:3: warning: passing argument 3 of ‘X509V3_EXT_add_conf’ discards qualifiers from pointer target type
/usr/include/openssl/x509v3.h:543:5: note: expected ‘char *’ but argument is of type ‘const char *’
make[1]: *** [src/csr.o] Error 1
zhaozg commented 13 years ago

I Build it with openssl-1.0, give me some time to support openssl-0.9.8

dvv commented 13 years ago

yeah, i'm looking for 1.0 version for ubuntu

dvv commented 13 years ago

openssl-1.0:

src/x509.c:411:1: error: pasting "openssl_register_sk_x509" and "(" does not give a valid preprocessing token
zhaozg commented 13 years ago

Please see at https://github.com/zhaozg/lua-openssl/commit/7a1fa31d1b0838bf990e0fdb6f7f3803b26cf563.

This change include support openssl 0.98 and openssl 1.0, and update makefile. I compile under windows with msvc2008 and centos 5.5 successfully. But not fully test, there will be bugs, please careful.

Thank you for open first issue, :)

Good luck.