0.1.1 • Published 8 years ago

trusted-ca v0.1.1

Weekly downloads
8
License
ISC
Repository
github
Last release
8 years ago

trusted-ca

Nodejs package for loading the system ca-bundle trust certificates into the https globalAgent.

Certificates loaded:

  • /etc/pki/tls/certs/ca-bundle.crt
  • /etc/ssl/certs/ca-certificates.crt
  • /usr/local/etc/openssl/cert.pem
  • OSX key chains (System, SystemRootCertificates, requires node v0.11.12+)

NOTE: If no certs are found, this falls back to nodejs defaults.

Install

npm install trusted-ca --save

Usage

'use strict'

const https = require('https');

require('trusted-ca');

const options = {
  hostname: 'mysecuredomain.com',
  port: 443,
  path: '/'
};

const req = https.request(options, res => {
  res.setEncoding('utf8');
  res.on('data', d => {
    console.log('data', d);
  });
});

req.on('error', err => {
  console.log('rats, an error!', err);
});

req.end();
0.1.1

8 years ago

0.1.0

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago