aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cryptobox.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-09 14:50:59 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-06-09 14:50:59 +0100
commit6c550a6488bd70daa137be7d81a1559809d35cf8 (patch)
tree0a0fe8b4cc6954724621b4c7c83e2f51fecf1f23 /src/lua/lua_cryptobox.c
parente84079028a29fadf1dc4e7c2d4b2dbb27cb739c6 (diff)
downloadrspamd-6c550a6488bd70daa137be7d81a1559809d35cf8.tar.gz
rspamd-6c550a6488bd70daa137be7d81a1559809d35cf8.zip
[Feature] Add tool to encrypt files
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);
}
}