https://github.com/hxfdarling/cert-helper
Install and Verify root CA for proxy, support windows and mac
https://github.com/hxfdarling/cert-helper
certificate installer mac root-certificate verify windows
Last synced: about 1 year ago
JSON representation
Install and Verify root CA for proxy, support windows and mac
- Host: GitHub
- URL: https://github.com/hxfdarling/cert-helper
- Owner: hxfdarling
- Created: 2020-01-18T10:52:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T05:17:37.000Z (over 3 years ago)
- Last Synced: 2025-04-24T06:52:00.021Z (about 1 year ago)
- Topics: certificate, installer, mac, root-certificate, verify, windows
- Language: JavaScript
- Homepage:
- Size: 959 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cert Helper
Install and trust certificates automatically. Very useful in the use of agent software scenarios.
## Usage
### Install
```sh
npm i cert-helper
```
### install certificate
Install certification as root certificate
```js
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
```js
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!');
}
}
);
```