How to use the selfsigned.js function in selfsigned

To help you get started, we’ve selected a few selfsigned examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AugurProject / augur-app / src / main / augurUIServer.js View on Github external
AugurUIServer.prototype.createSSLCertificates = function (event) {
  const certPath = path.join(this.appDataPath, 'localhost.crt')
  const keyPath = path.join(this.appDataPath, 'localhost.key')

  if (fs.existsSync(certPath) && fs.existsSync(keyPath)) return

  const kg = new KeyGen()
  log.info('start generating self signed certifiate files')
  kg.getPrime(1024, (err, p) => {
    if (err) {
      log.error(err)
      event.sender.send(ERROR_NOTIFICATION, {
        messageType: SSL_GEN_ERROR,
        message: err.message || err
      })
      return
    }
    log.info('finalize key and cert files')
    kg.getPrime(1024, (err, q) => {
      if (err) {
        log.error(err)
        event.sender.send(ERROR_NOTIFICATION, {
          messageType: SSL_GEN_ERROR,
github AugurProject / augur / src / main / augurUIServer.js View on Github external
AugurUIServer.prototype.createSSLCertificates = function (event) {
  const certPath = path.join(this.appDataPath, 'localhost.crt')
  const keyPath = path.join(this.appDataPath, 'localhost.key')

  if (fs.existsSync(certPath) && fs.existsSync(keyPath)) return

  const kg = new KeyGen()
  log.info('start generating self signed certifiate files')
  kg.getPrime(1024, (err, p) => {
    if (err) {
      log.error(err)
      event.sender.send(ERROR_NOTIFICATION, {
        messageType: SSL_GEN_ERROR,
        message: err.message || err
      })
      return
    }
    log.info('finalize key and cert files')
    kg.getPrime(1024, (err, q) => {
      if (err) {
        log.error(err)
        event.sender.send(ERROR_NOTIFICATION, {
          messageType: SSL_GEN_ERROR,

selfsigned

Generate self signed certificates private and public keys

MIT
Latest version published 9 months ago

Package Health Score

80 / 100
Full package analysis