1.3.2 • Published 5 years ago

trust-cert v1.3.2

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
5 years ago

trust-cert Build Status

Trust Root Certificates in MacOs, Linux, Windows and Firefox (nss)

Docs

Installation

NPM

npm i trust-cert

Yarn

yarn add trust-cert

Install Certificate

import { generateTrust } from 'trust-cert'
import { join } from 'path'

const certPath = join(__dirname, 'certs/eos_root_ca.crt')
const trust = generateTrust()

(async () => {
    await trust.installFromFile(certPath, 'EOS Root CA')
})

Uninstall Certificate

import { generateTrust } from 'trust-cert'
import { join } from 'path'

const certPath = join(__dirname, 'certs/eos_root_ca.crt')
const trust = generateTrust()

(async () => {
    await trust.uninstall(certPath, 'EOS Root CA')
})

NSS (Firefox) Certificate Install

Firefox does not use system store, so we package cross-platform nss binaries.

import { NssTrust } from 'trust-cert'
import { join } from 'path'

const certPath = join(__dirname, 'certs/eos_root_ca.crt')
const trust = new NssTrust()

(async () => {
    await trust.installFromFile(certPath, 'EOS Root CA')
})

NSS (Firefox) Certificate Uninstall

Firefox does not use system store, so we package cross-platform nss binaries.

import { NssTrust } from 'trust-cert'
import { join } from 'path'

const certPath = join(__dirname, 'certs/eos_root_ca.crt')
const trust = new NssTrust()

(async () => {
    await trust.uninstall(certPath, 'EOS Root CA')
})

Note: The tests install the root CA in the certs folder into your store, modify the certs folder if you wish to test with your own cert.

Credits: mkcert

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago