Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

syswide-cas

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syswide-cas

Enable node to use system wide certificate authorities in conjunction with the bundled root CAs

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-6.87%
Maintainers
1
Weekly downloads
 
Created
Source

syswide-cas

Enable node to use custom certificate authorities in conjunction with the bundled root CAs.

Node does not support system-wide installed trusted certificate authorities. It is only possible to specify a custom CA via the ca option in the tls and https modules, or fallback to using the bundled list of root CAs that node is compiled with.

This module enables loading custom CAs located in the file /etc/ssl/ca-node.pem in conjunction with the node bundled root CAs.

Installation

npm install --save syswide-cas

Usage

Add require('syswide-cas') as soon as possible as it affects all later TLS calls.

// "require('syswide-cas')" immediatley loads CAs from the file /etc/ssl/ca-node.pem if it exists
const syswidecas = require('syswide-cas');

// optionally load all files from a custom directory
syswidecas.addCAs('/my/custom/path/to/certs/dir');

// or multiple directories
syswidecas.addCAs(['/my/custom/path/to/certs/dir1', '/my/other/path/to/certs/dir2']);

// optionally load a file directly
syswidecas.addCAs('/my/custom/path/to/cert.pem');

// or multiple files
syswidecas.addCAs(['/my/custom/path/to/cert1.pem', '/my/other/path/to/cert2.pem']);


const https = require('https');
https.get('https://my.custom.domain.com/with/self/signed/cert');

License

Copyright 2016 Capriza. Code released under the MIT license

Keywords

FAQs

Package last updated on 18 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc