Software /
code /
prosody
Comparison
util-src/crypto.c @ 12976:a187600ec7d6
util: Add compat for prosody module name change to C sources
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 17 Mar 2023 18:03:07 +0100 |
parent | 12876:0ed24f48b6a6 |
comparison
equal
deleted
inserted
replaced
12975:d10957394a3c | 12976:a187600ec7d6 |
---|---|
590 static const luaL_Reg KeyMetatable[] = { | 590 static const luaL_Reg KeyMetatable[] = { |
591 { "__gc", Lpkey_finalizer }, | 591 { "__gc", Lpkey_finalizer }, |
592 { NULL, NULL } | 592 { NULL, NULL } |
593 }; | 593 }; |
594 | 594 |
595 LUALIB_API int luaopen_util_crypto(lua_State *L) { | 595 LUALIB_API int luaopen_prosody_util_crypto(lua_State *L) { |
596 #if (LUA_VERSION_NUM > 501) | 596 #if (LUA_VERSION_NUM > 501) |
597 luaL_checkversion(L); | 597 luaL_checkversion(L); |
598 #endif | 598 #endif |
599 | 599 |
600 /* Initialize pkey metatable */ | 600 /* Initialize pkey metatable */ |
614 lua_pushstring(L, OpenSSL_version(OPENSSL_VERSION)); | 614 lua_pushstring(L, OpenSSL_version(OPENSSL_VERSION)); |
615 lua_setfield(L, -2, "_LIBCRYPTO_VERSION"); | 615 lua_setfield(L, -2, "_LIBCRYPTO_VERSION"); |
616 #endif | 616 #endif |
617 return 1; | 617 return 1; |
618 } | 618 } |
619 | |
620 LUALIB_API int luaopen_util_crypto(lua_State *L) { | |
621 return luaopen_prosody_util_crypto(L); | |
622 } |