Skip to content

Commit

Permalink
use crypto module for key pair
Browse files Browse the repository at this point in the history
  • Loading branch information
FLYBYME authored Sep 3, 2023
1 parent c58cba6 commit 58c5c8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/certificates.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 58c5c8c

Please sign in to comment.