aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cryptobox.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_cryptobox.c')
-rw-r--r--src/lua/lua_cryptobox.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c
index 62464ad3a..5f4908adf 100644
--- a/src/lua/lua_cryptobox.c
+++ b/src/lua/lua_cryptobox.c
@@ -1548,10 +1548,10 @@ lua_cryptobox_encrypt_memory (lua_State *L)
GError *err = NULL;
if (lua_type (L, 1) == LUA_TUSERDATA) {
- if (rspamd_lua_check_udata (L, 1, "rspamd{cryptobox_keypair}")) {
+ if (rspamd_lua_check_udata_maybe (L, 1, "rspamd{cryptobox_keypair}")) {
kp = lua_check_cryptobox_keypair (L, 1);
}
- else if (rspamd_lua_check_udata (L, 1, "rspamd{cryptobox_pubkey}")) {
+ else if (rspamd_lua_check_udata_maybe (L, 1, "rspamd{cryptobox_pubkey}")) {
pk = lua_check_cryptobox_pubkey (L, 1);
}
}
@@ -1630,10 +1630,10 @@ lua_cryptobox_encrypt_file (lua_State *L)
GError *err = NULL;
if (lua_type (L, 1) == LUA_TUSERDATA) {
- if (rspamd_lua_check_udata (L, 1, "rspamd{cryptobox_keypair}")) {
+ if (rspamd_lua_check_udata_maybe (L, 1, "rspamd{cryptobox_keypair}")) {
kp = lua_check_cryptobox_keypair (L, 1);
}
- else if (rspamd_lua_check_udata (L, 1, "rspamd{cryptobox_pubkey}")) {
+ else if (rspamd_lua_check_udata_maybe (L, 1, "rspamd{cryptobox_pubkey}")) {
pk = lua_check_cryptobox_pubkey (L, 1);
}
}