Giter Site home page Giter Site logo

csr-gen's People

Contributors

cinderblock avatar ericvicenti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

csr-gen's Issues

missing a step?

Am I missing something? In order to spin-up an HTTPS server, I would do something like this:

var privateKey = fs.readFileSync('privatekey.pem').toString();
var certificate = fs.readFileSync('certificate.pem').toString();
var server = https.createServer({key: privateKey, cert: certificate});
server.listen(8000);

To generate the key, csr, and cert I would run commands like this:

openssl genrsa -out privatekey.pem 2048
openssl req -new -key privatekey.pem -out certrequest.csr -subj "/C=US/ST=California/L=San Fransisco/O=Loadtester/OU=Operations/CN=konsumer-mac.local/[email protected]"
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem

For a similar approach with your module:

csrgen(os.hostname(), {
    outputDir: __dirname,
    read: true,
    company: 'Loadtester',
    email: '[email protected]'
}, function(err, keys){
    if (err) throw(err);    
    var server = https.createServer({key: keys.private, cert: NOCERT});
});

This lib does only the first 2 parts of the SSL signing process: generate a private key, and generate a csr. Am I doing this wrong, or is it just missing the functionality to actually make a cert? Would it be possible to use crypto to do all this, for a 100% native approach, so openssl command-line util is not needed?

csr file is not generated

From the test snippet. The private key is generated but CSR file is undefined. Am I missing anything here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.