From 57bcc165948a991002c4811eba5e35e8ff88e5d3 Mon Sep 17 00:00:00 2001 From: Jeremy Albright <1935258+Js-Brecht@users.noreply.github.com> Date: Thu, 21 Nov 2019 08:13:18 -1000 Subject: [PATCH] Fixes expiration date issues on MacOS (#45) * Fixes expiration date issues on MacOS * Fix expiration for certificates --- src/certificate-authority.ts | 2 +- src/certificates.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/certificate-authority.ts b/src/certificate-authority.ts index 12de656..0844820 100644 --- a/src/certificate-authority.ts +++ b/src/certificate-authority.ts @@ -44,7 +44,7 @@ export default async function installCertificateAuthority(options: Options = {}) generateKey(rootKeyPath); debug(`Generating a CA certificate`); - openssl(`req -new -x509 -config "${ caSelfSignConfig }" -key "${ rootKeyPath }" -out "${ rootCertPath }" -days 7000`); + openssl(`req -new -x509 -config "${ caSelfSignConfig }" -key "${ rootKeyPath }" -out "${ rootCertPath }" -days 825`); debug('Saving certificate authority credentials'); await saveCertificateAuthorityCredentials(rootKeyPath, rootCertPath); diff --git a/src/certificates.ts b/src/certificates.ts index 78fe1c3..a2bba8b 100644 --- a/src/certificates.ts +++ b/src/certificates.ts @@ -33,7 +33,7 @@ export default async function generateDomainCertificate(domain: string): Promise await withCertificateAuthorityCredentials(({ caKeyPath, caCertPath }) => { withDomainCertificateConfig(domain, (domainCertConfigPath) => { - openssl(`ca -config "${ domainCertConfigPath }" -in "${ csrFile }" -out "${ domainCertPath }" -keyfile "${ caKeyPath }" -cert "${ caCertPath }" -days 7000 -batch`) + openssl(`ca -config "${ domainCertConfigPath }" -in "${ csrFile }" -out "${ domainCertPath }" -keyfile "${ caKeyPath }" -cert "${ caCertPath }" -days 825 -batch`) }); }); }