various fixes
parent
331afd449a
commit
60a65f3709
|
@ -1,5 +1,6 @@
|
|||
import fs, { writeFile, unlink } from 'fs-extra';
|
||||
import axios from 'axios';
|
||||
import { randomBytes } from 'crypto';
|
||||
import { Message } from 'eris';
|
||||
import { AccountInterface } from '../models';
|
||||
import { Command, RichEmbed } from '../class';
|
||||
|
@ -87,7 +88,9 @@ export default class CWG_Create extends Command {
|
|||
.addField('Domain', domain.domain, true)
|
||||
.addField('Port', String(domain.port), true);
|
||||
|
||||
const cert = await parseCertificate(this.client, domain.x509.cert);
|
||||
const certPath = `/opt/CloudServices/temp/${randomBytes(5).toString('hex')}`;
|
||||
await writeFile(certPath, certs.cert, { encoding: 'utf8' });
|
||||
const cert = await parseCertificate(this.client, certPath);
|
||||
|
||||
embed.addField('Certificate Issuer', cert.issuer.organizationName, true)
|
||||
.addField('Certificate Subject', cert.subject.commonName, true)
|
||||
|
|
Loading…
Reference in New Issue