1
0
Fork 0

typing fix

refactor/models
Matthew 2020-05-12 10:47:40 -04:00
parent 025c14139b
commit c2c00e102d
No known key found for this signature in database
GPG Key ID: D499B75C1390E321
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ export default class CWG_Create extends Command {
public async createCertAndPrivateKey(domain: string, certChain: string, privateKey: string) { public async createCertAndPrivateKey(domain: string, certChain: string, privateKey: string) {
if (!this.isValidCertificateChain(certChain)) throw new Error('Invalid Certificate Chain'); if (!this.isValidCertificateChain(certChain)) throw new Error('Invalid Certificate Chain');
if (!this.isValidPrivateKey(privateKey)) throw new Error('Invalid Private Key'); // if (!this.isValidPrivateKey(privateKey)) throw new Error('Invalid Private Key');
const path = `/opt/CloudServices/temp/${domain}`; const path = `/opt/CloudServices/temp/${domain}`;
await Promise.all([writeFile(`${path}.chain.crt`, certChain), writeFile(`${path}.key.pem`, privateKey)]); await Promise.all([writeFile(`${path}.chain.crt`, certChain), writeFile(`${path}.key.pem`, privateKey)]);
if (!this.isMatchingPair(`${path}.chain.crt`, `${path}.key.pem`)) { if (!this.isMatchingPair(`${path}.chain.crt`, `${path}.key.pem`)) {