From b7b068b572e951534747ccd57a8c0987170ab423 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 3 Apr 2017 18:41:51 +1000 Subject: Have (empty) openssl.ocsp.response module --- src/GNUmakefile | 1 + src/openssl.c | 21 +++++++++++++++++++-- src/openssl.ocsp.response.lua | 3 +++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/openssl.ocsp.response.lua (limited to 'src') diff --git a/src/GNUmakefile b/src/GNUmakefile index 7de802a..132f3bf 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -93,6 +93,7 @@ MODS$(1)_$(d) = \ $$(DESTDIR)$(3)/openssl/auxlib.lua \ $$(DESTDIR)$(3)/openssl/bignum.lua \ $$(DESTDIR)$(3)/openssl/ocsp/basic.lua \ + $$(DESTDIR)$(3)/openssl/ocsp/response.lua \ $$(DESTDIR)$(3)/openssl/pkey.lua \ $$(DESTDIR)$(3)/openssl/pubkey.lua \ $$(DESTDIR)$(3)/openssl/x509.lua \ diff --git a/src/openssl.c b/src/openssl.c index 83e8bc8..e8dbead 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -9254,11 +9254,10 @@ int luaopen__openssl_cipher(lua_State *L) { /* - * OCSP + * OCSP_RESPONSE - openssl.ocsp.response * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - static int or_tostring(lua_State *L) { OCSP_RESPONSE *resp = checksimple(L, 1, OCSP_RESPONSE_CLASS); BIO *bio = getbio(L); @@ -9328,6 +9327,23 @@ static const auxL_Reg or_metatable[] = { { NULL, NULL }, }; +static const auxL_Reg or_globals[] = { + { NULL, NULL }, +}; + +int luaopen__openssl_ocsp_response(lua_State *L) { + initall(L); + + auxL_newlib(L, or_globals, 0); + + return 1; +} /* luaopen__openssl_ocsp_response() */ + + +/* + * OCSP_BASICRESP - openssl.ocsp.basic + * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ static int ob_verify(lua_State *L) { OCSP_BASICRESP *basic = checksimple(L, 1, OCSP_BASICRESP_CLASS); @@ -9396,6 +9412,7 @@ int luaopen__openssl_ocsp_basic(lua_State *L) { return 1; } /* luaopen__openssl_ocsp_basic() */ + /* * Rand - openssl.rand * diff --git a/src/openssl.ocsp.response.lua b/src/openssl.ocsp.response.lua new file mode 100644 index 0000000..2226096 --- /dev/null +++ b/src/openssl.ocsp.response.lua @@ -0,0 +1,3 @@ +local ocsp_response = require "_openssl.ocsp.response" + +return ocsp_response -- cgit v1.2.3-59-g8ed1b