commit 52abb61: [Minor] Add --name parameter to keypair generation

Vsevolod Stakhov vsevolod at rspamd.com
Thu Jan 5 09:49:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-01-05 09:44:44 +0000
URL: https://github.com/rspamd/rspamd/commit/52abb61a10d81cbf98940a64167494b07b603dfd (HEAD -> master)

[Minor] Add --name parameter to keypair generation

---
 lualib/rspamadm/keypair.lua | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lualib/rspamadm/keypair.lua b/lualib/rspamadm/keypair.lua
index 62f2909b7..27dfd59a3 100644
--- a/lualib/rspamadm/keypair.lua
+++ b/lualib/rspamadm/keypair.lua
@@ -48,6 +48,9 @@ generate:mutex(
             :description "Output UCL"
             :default(true)
 )
+generate:option "--name"
+        :description "Adds name extension"
+        :argname "<name>"
 
 -- Sign subcommand
 
@@ -191,6 +194,12 @@ local function generate_handler(opts)
   -- TODO: probably, do it in a more safe way
   local kp = rspamd_keypair.create(mode, alg):totable()
 
+  if opts.name then
+    kp.keypair.extensions = {
+      name = opts.name
+    }
+  end
+
   local format = 'ucl'
 
   if opts.json then


More information about the Commits mailing list