diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-04-07 16:54:37 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-04-07 16:54:37 +0100 |
commit | 1fb491d630da91c2959d574ddc20047ac2aacde7 (patch) | |
tree | 6ea487c8f10ed0661f6ef5fe26c16f990f67279e /lualib/rspamadm/configwizard.lua | |
parent | a070e5a10a3084bf75472177bedfacc612c25071 (diff) | |
download | rspamd-1fb491d630da91c2959d574ddc20047ac2aacde7.tar.gz rspamd-1fb491d630da91c2959d574ddc20047ac2aacde7.zip |
[Fix] Do not use `rspamadm.dkim_keygen`
Diffstat (limited to 'lualib/rspamadm/configwizard.lua')
-rw-r--r-- | lualib/rspamadm/configwizard.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lualib/rspamadm/configwizard.lua b/lualib/rspamadm/configwizard.lua index a375d81cc..c79d73b97 100644 --- a/lualib/rspamadm/configwizard.lua +++ b/lualib/rspamadm/configwizard.lua @@ -378,7 +378,10 @@ local function setup_dkim_signing(cfg, changes) if ask_yes_no("Do you want to create privkey " .. highlight(privkey_file), true) then local pubkey_file = privkey_file .. ".pub" - rspamadm.dkim_keygen(domain, selector, privkey_file, pubkey_file, 2048) + local rspamd_cryptobox = require "rspamd_cryptobox" + local sk, pk = rspamd_cryptobox.generate_keypair("rsa", 2048) + pk:save_to_file(pubkey_file) + sk:save_to_file(privkey_file, tonumber('0600', 8)) local f = io.open(pubkey_file) if not f then |