summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/openssl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 1c0dfbd..c3b9145 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -2889,6 +2889,13 @@ static int xe_interpose(lua_State *L) {
2889} /* xe_interpose() */ 2889} /* xe_interpose() */
2890 2890
2891 2891
2892static int xe_getData(lua_State *L) {
2893 ASN1_STRING *data = X509_EXTENSION_get_data(checksimple(L, 1, X509_EXT_CLASS));
2894 lua_pushlstring(L, (char *) ASN1_STRING_data(data), ASN1_STRING_length(data));
2895 return 1;
2896} /* xe_getData() */
2897
2898
2892static int xe__gc(lua_State *L) { 2899static int xe__gc(lua_State *L) {
2893 X509_EXTENSION **ud = luaL_checkudata(L, 1, X509_EXT_CLASS); 2900 X509_EXTENSION **ud = luaL_checkudata(L, 1, X509_EXT_CLASS);
2894 2901
@@ -2902,7 +2909,8 @@ static int xe__gc(lua_State *L) {
2902 2909
2903 2910
2904static const luaL_Reg xe_methods[] = { 2911static const luaL_Reg xe_methods[] = {
2905 { NULL, NULL }, 2912 { "getData", &xe_getData },
2913 { NULL, NULL },
2906}; 2914};
2907 2915
2908static const luaL_Reg xe_metatable[] = { 2916static const luaL_Reg xe_metatable[] = {