aboutsummaryrefslogtreecommitdiffstats
path: root/util-src
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-01-20 11:33:31 +0100
committerKim Alvefur <zash@zash.se>2017-01-20 11:33:31 +0100
commit8e052e0857a2b62c33271334470ff529f9b76a85 (patch)
tree5d75c63a76c54d3bdc21ffea90c6093cbf03f187 /util-src
parenta59ab44459bfd79feb1f74ac1ba9cdd891e5946f (diff)
downloadprosody-8e052e0857a2b62c33271334470ff529f9b76a85.tar.gz
prosody-8e052e0857a2b62c33271334470ff529f9b76a85.zip
util.crand: Remove seeding
Diffstat (limited to 'util-src')
-rw-r--r--util-src/crand.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/util-src/crand.c b/util-src/crand.c
index 21079be0..6b9dc726 100644
--- a/util-src/crand.c
+++ b/util-src/crand.c
@@ -77,22 +77,6 @@ int Lrandom(lua_State *L) {
return 1;
}
-#ifdef ENABLE_SEEDING
-int Lseed(lua_State *L) {
- size_t len;
- const char *seed = lua_tolstring(L, 1, &len);
-
-#if defined(WITH_OPENSSL)
- RAND_add(seed, len, len);
- return 0;
-#else
- lua_pushnil(L);
- lua_pushliteral(L, "not-supported");
- return 2;
-#endif
-}
-#endif
-
int luaopen_util_crand(lua_State *L) {
#if (LUA_VERSION_NUM > 501)
luaL_checkversion(L);
@@ -100,10 +84,6 @@ int luaopen_util_crand(lua_State *L) {
lua_newtable(L);
lua_pushcfunction(L, Lrandom);
lua_setfield(L, -2, "bytes");
-#ifdef ENABLE_SEEDING
- lua_pushcfunction(L, Lseed);
- lua_setfield(L, -2, "seed");
-#endif
#if defined(WITH_GETRANDOM)
lua_pushstring(L, "Linux");