node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…


Verification of SSL certificates


SSL certificate verification for node.js

This module uses the OpenSSL command line utility - documentation can be found at

var ssl = require('ssl')
  , cert = 'encrypted certificate'
  , caFile = ''
  , key = 'key.pem'
  , pass = 'abcdefg';

ssl.toFile(cert, { fileName: 'cert.pem' } function(err, file) {
  if (err) return console.error(err)
  console.log('Wrote string content to file %s', file);

ssl.verify(caFile, cert, function(err, status) {
  if (err) return console.error(err);

ssl.removePassphrase(cert, pass, { newKeyName: 'opencert.pem' }, function(err) {
  if (err) return console.error(err);
  console.log('passphrase removed!');