acme: if account key was revoked, generate new account key

the plan was to migrate only specific keys but this allows us the
flexibility to revoke keys after the release (since we have not
gotten response from DO about access to old 1-click images so far).
This commit is contained in:
Girish Ramakrishnan
2021-11-16 22:56:35 -08:00
parent b7c5c99301
commit c4db0d746d
4 changed files with 29 additions and 46 deletions

View File

@@ -54,10 +54,6 @@ async function clear() {
}
async function generateSecrets() {
const acmeAccountKey = safe.child_process.execSync('openssl genrsa 4096');
if (!acmeAccountKey) throw new BoxError(BoxError.OPENSSL_ERROR, `Could not generate acme account key: ${safe.error.message}`);
await set(exports.ACME_ACCOUNT_KEY, acmeAccountKey);
debug('generateSecrets: generating dhparams.pem');
// https://security.stackexchange.com/questions/95178/diffie-hellman-parameters-still-calculating-after-24-hours
const dhparams = safe.child_process.execSync('openssl dhparam -dsaparam 2048');