aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-04-07 16:08:15 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-04-07 16:39:21 +0100
commit58bd6be3f7f9302e51ae4031658311f9cc9842d8 (patch)
tree2bba4aba75670a2c478b744dcd2b78613f2c7f14 /src
parent553d2c2f60bce6265868c147b59abb6fd4d65f65 (diff)
downloadrspamd-58bd6be3f7f9302e51ae4031658311f9cc9842d8.tar.gz
rspamd-58bd6be3f7f9302e51ae4031658311f9cc9842d8.zip
[Rework] Write dkim keygen tool in lua
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_rsa.c8
-rw-r--r--src/rspamadm/CMakeLists.txt1
-rw-r--r--src/rspamadm/commands.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/lua/lua_rsa.c b/src/lua/lua_rsa.c
index 571f62646..359660bc7 100644
--- a/src/lua/lua_rsa.c
+++ b/src/lua/lua_rsa.c
@@ -210,7 +210,13 @@ lua_rsa_privkey_save (lua_State *L)
else {
lua_pushboolean (L, TRUE);
}
- fclose (f);
+
+ if (f != stdout) {
+ fclose (f);
+ }
+ else {
+ fflush (f);
+ }
}
}
else {
diff --git a/src/rspamadm/CMakeLists.txt b/src/rspamadm/CMakeLists.txt
index 13e2fb6da..125e04804 100644
--- a/src/rspamadm/CMakeLists.txt
+++ b/src/rspamadm/CMakeLists.txt
@@ -9,7 +9,6 @@ SET(RSPAMADMSRC rspamadm.c
stat_convert.c
signtool.c
lua_repl.c
- dkim_keygen.c
${CMAKE_BINARY_DIR}/src/workers.c
#${CMAKE_BINARY_DIR}/src/modules.c - defined in rspamdserver
${CMAKE_SOURCE_DIR}/src/controller.c
diff --git a/src/rspamadm/commands.c b/src/rspamadm/commands.c
index aabf6747e..c52eecd3d 100644
--- a/src/rspamadm/commands.c
+++ b/src/rspamadm/commands.c
@@ -28,7 +28,6 @@ extern struct rspamadm_command statconvert_command;
extern struct rspamadm_command fuzzyconvert_command;
extern struct rspamadm_command signtool_command;
extern struct rspamadm_command lua_command;
-extern struct rspamadm_command dkim_keygen_command;
const struct rspamadm_command *commands[] = {
&help_command,
@@ -41,7 +40,6 @@ const struct rspamadm_command *commands[] = {
&fuzzyconvert_command,
&signtool_command,
&lua_command,
- &dkim_keygen_command,
NULL
};