From: Vsevolod Stakhov Date: Fri, 7 Apr 2023 15:54:37 +0000 (+0100) Subject: [Fix] Do not use `rspamadm.dkim_keygen` X-Git-Tag: 3.6~164 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1fb491d630da91c2959d574ddc20047ac2aacde7;p=thirdparty%2Frspamd.git [Fix] Do not use `rspamadm.dkim_keygen` --- diff --git a/lualib/rspamadm/configwizard.lua b/lualib/rspamadm/configwizard.lua index a375d81ccd..c79d73b97b 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