Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    cert-unbundlepublic

    cert-unbundle

    turn a certificate bundle into an array of certificates you can pass to tls as the opts.ca

    build status

    testling badge

    example

    split

    var fs = require('fs')
    var unbundle = require('cert-unbundle');
     
    var certs = unbundle(fs.readFileSync('bundle.ca', 'utf8'));
    console.log(certs);

    server

    var fs = require('fs')
    var https = require('https');
    var unbundle = require('cert-unbundle');
     
    var certs = unbundle(fs.readFileSync('bundle.ca', 'utf8'));
     
    var opts = { ca: certs };
    var server = https.createServer(opts, function () {
        res.end('beep boop\n');
    });
    server.listen(443);

    methods

    var unbundle = require('cert-unbundle')

    var certs = unbundle(certContents)

    Return an array of certificate strings certs from a buffer or string of the bundled certContents.

    install

    With npm do:

    npm install cert-unbundle

    license

    MIT

    install

    npm i cert-unbundle

    Downloadslast 7 days

    4

    version

    0.0.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar