From 56c62dabdf6426119adc8dbd8bdb2c212eff43c4 Mon Sep 17 00:00:00 2001 From: Jeremy Albright Date: Fri, 8 Nov 2019 06:16:11 -1000 Subject: [PATCH 1/2] Fixes expiration date issues on MacOS --- src/certificate-authority.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); From 500f0e8b2bb7d426db7ba41ee1a0a5db0f3e7665 Mon Sep 17 00:00:00 2001 From: Jeremy Albright Date: Fri, 8 Nov 2019 06:36:29 -1000 Subject: [PATCH 2/2] Fix expiration for certificates --- src/certificates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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`) }); }); }