Skip to content

Commit

Permalink
chore: ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
murilopereirame committed Nov 19, 2023
1 parent 1287998 commit 9dca6c2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 9dca6c2

Please sign in to comment.