From: Vsevolod Stakhov Date: Tue, 5 May 2020 08:50:35 +0000 (+0100) Subject: [Minor] Fix some issues found X-Git-Tag: 2.6~452 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=569825264466b743f741514f117afae29c4b8dad;p=rspamd.git [Minor] Fix some issues found --- diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c index 12f3e063f..b0f5f0bac 100644 --- a/src/lua/lua_cryptobox.c +++ b/src/lua/lua_cryptobox.c @@ -2661,7 +2661,7 @@ lua_cryptobox_secretbox_decrypt (lua_State *L) TRUE); gint text_pos = lua_gettop (L); - if (crypto_secretbox_easy ((guchar *)out->start, in, inlen, + if (crypto_secretbox_open_easy ((guchar *)out->start, in, inlen, nonce, sbox->sk) == 0) { lua_pushboolean (L, true); lua_pushvalue (L, text_pos); /* Prevent gc by copying in stack */ @@ -2717,7 +2717,7 @@ static gint lua_load_cryptobox_secretbox (lua_State * L) { lua_newtable (L); - luaL_register (L, NULL, cryptoboxhashlib_f); + luaL_register (L, NULL, cryptoboxsecretboxlib_f); return 1; }