From 9dca6c2f2bd7c80b71c0469cdead0bb78b03c0e9 Mon Sep 17 00:00:00 2001 From: Murilo Pereira Date: Sun, 19 Nov 2023 02:56:48 +0100 Subject: [PATCH] chore: ESLint --- src/main/server.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/server.ts b/src/main/server.ts index d8162bb..53d9e65 100644 --- a/src/main/server.ts +++ b/src/main/server.ts @@ -16,7 +16,6 @@ export enum EServerStatus { export class WebServer { private static instance: WebServer | null - private publicKey = '' private privateKey = '' private cert = '' server: Server | null = null @@ -36,14 +35,12 @@ export class WebServer { } private generateCertificate = () => { - forge.options.usePureJavaScript = true - const pki = forge.pki const keys = pki.rsa.generateKeyPair() const cert = pki.createCertificate() cert.publicKey = keys.publicKey - cert.serialNumber = `${Math.abs(parseInt(crypto.randomBytes(20).toString('hex')), 16)}` + cert.serialNumber = `${Math.abs(parseInt(crypto.randomBytes(20).toString('hex')))}` cert.validity.notBefore = new Date() cert.validity.notAfter = new Date(2030, 0, 1)