SSL certificate verification for node.js
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
spec
.gitignore
.jshintrc
.travis.yml
LICENSE
Makefile
README.md
package.json
ssl.js

README.md

VERIFY-SSL

SSL certificate verification for node.js

Build Status

Docs

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

Usage

var ssl = require('ssl')
  , cert = 'encrypted certificate'
  , caFile = 'file.ca'
  , 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);
  console.log(status);
});

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