Skip to content

Install and Verify root CA for proxy, support windows and mac

Notifications You must be signed in to change notification settings

hxfdarling/cert-helper

Repository files navigation

Cert Helper

Install and trust certificates automatically. Very useful in the use of agent software scenarios.

Usage

Install

npm i cert-helper

install certificate

Install certification as root certificate

const { certInstaller } = require('cert-helper');
certInstaller(path.resolve('./certs/root.crt'), (err) => {
  if (err) {
    //install error
  } else {
    //install success
  }
});

verify certificate

Check certificate is installed

const { certVerify } = require('cert-helper');
certVerify(
  {
    certDir: path.resolve('./certs/root.crt'),
    certName: 'certificate name',
  },

  (err) => {
    if (err) {
      console.info('Check cert failed!');
    } else {
      console.info('Check cert success!');
    }
  }
);

About

Install and Verify root CA for proxy, support windows and mac

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published