Skip to content

Instantly share code, notes, and snippets.

@FloStar3000
Created March 23, 2021 15:22
Show Gist options
  • Select an option

  • Save FloStar3000/79ebaf9e24ed1b57fd385463010051d5 to your computer and use it in GitHub Desktop.

Select an option

Save FloStar3000/79ebaf9e24ed1b57fd385463010051d5 to your computer and use it in GitHub Desktop.

Revisions

  1. FloStar3000 created this gist Mar 23, 2021.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    // use exported ca root cert from browser
    const rawCert = fs.readFileSync('certfile','utf-8')
    const lines = rawCert.split('\r\n')
    const linesFormatted = lines.map(line=>`\"${line}\\n\" \\`)
    //
    fs.writeFileSync('cert.txt',linesFormatted.join('\n'))