commit 5698252: [Minor] Fix some issues found

Vsevolod Stakhov vsevolod at highsecure.ru
Tue May 5 08:56:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-05-05 09:50:35 +0100
URL: https://github.com/rspamd/rspamd/commit/569825264466b743f741514f117afae29c4b8dad (HEAD -> master)

[Minor] Fix some issues found

---
 src/lua/lua_cryptobox.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
 }


More information about the Commits mailing list