summaryrefslogtreecommitdiffstats
path: root/src/lua
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/lua
parent553d2c2f60bce6265868c147b59abb6fd4d65f65 (diff)
downloadrspamd-58bd6be3f7f9302e51ae4031658311f9cc9842d8.tar.gz
rspamd-58bd6be3f7f9302e51ae4031658311f9cc9842d8.zip
[Rework] Write dkim keygen tool in lua
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_rsa.c8
1 files changed, 7 insertions, 1 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 {