From 58c5c8ca3b90dc130fbe29c5a5c362e3de8925ab Mon Sep 17 00:00:00 2001 From: Tim Date: Sun, 3 Sep 2023 20:29:38 +0000 Subject: [PATCH] use crypto module for key pair --- services/certificates.service.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/certificates.service.js b/services/certificates.service.js index 365c468..b79da6b 100644 --- a/services/certificates.service.js +++ b/services/certificates.service.js @@ -387,12 +387,17 @@ module.exports = { const saved = await this.createEntity(null, { domain: params.domain, keySelector: params.keySelector, + environment: "production", // TODO: get the environment from the context + email:`postmaster@${params.domain}`, type: 'dkim', privkey: privateKey, cert: publicKey, + chain: publicKey, expiresAt: Date.now() + (1000 * 3600 * 24 * 365 * 10), // 10 years }); + + // return the saved dkim keys return saved; }