@achingbrain/nss

Mozilla Network Security Services

Usage no npm install needed!

<script type="module">
  import achingbrainNss from 'https://cdn.skypack.dev/@achingbrain/nss';
</script>

README

Mozilla Network Security Services

64 bit versions of nss tools precompiled for Mac & Linux.

Installation

$ npm install @achingbrain/nss

 Usage

const nss = require('@achingbrain/nss')
const execFile = require('child_process').execFile
const PROFILE_DIR = '/some/path'

// Promises
nss()
.then(paths => {
  execFile(paths.certutil, ['-L', '-d', PROFILE_DIR], (error, result) => {
    // ...
  })
})

// Callbacks
nss((error, paths) => {
  if (error) {
    // handle error
  }

  execFile(paths.certutil, ['-L', '-d', PROFILE_DIR], (error, result) => {
    // ...
  })
})

Building new versions

  1. Download a version of nss from Mozilla's download server (choose one bundled with nspr)
  2. Run:
    $ tar -xzf nss-X.XX-with-nspr.tar.gz
    $ cd nss
    $ BUILD_OPT=1 USE_64=1 make nss_build_all
    
  3. Look in dist for compiled files