diff options
-rw-r--r-- | lualib/rspamadm/keypair.lua | 9 |
1 files changed, 9 insertions, 0 deletions
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 |