diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-05 09:44:44 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-01-05 09:44:44 +0000 |
commit | 52abb61a10d81cbf98940a64167494b07b603dfd (patch) | |
tree | 1190e91bc0e7493cb9b251cf7b4af61f10d713af /lualib | |
parent | 3f5ca5e8b061e34b713b1a2022e46c37529751db (diff) | |
download | rspamd-52abb61a10d81cbf98940a64167494b07b603dfd.tar.gz rspamd-52abb61a10d81cbf98940a64167494b07b603dfd.zip |
[Minor] Add --name parameter to keypair generation
Diffstat (limited to 'lualib')
-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 |