TK-421
TK-421

Reputation: 10763

Node.js + SSL support

Recent commits reference TLS progress. Any idea when it will be ready?

If not, what are the options for using SSL with a node app at the present time? Reverse proxy nginx? Is there a good tutorial available for using SSL with node?

Most professional apps need to support SSL these days and it would be great to be able to use node for these now.

Upvotes: 5

Views: 3301

Answers (4)

dlongley
dlongley

Reputation: 2096

Just for reference ... here's a JavaScript implementation of SSL/TLS:

https://github.com/digitalbazaar/forge

At the moment, it is only a client-side implementation. It would need to be expanded to cover server-side. For someone with a little knowledge about how TLS works, however, it shouldn't be too difficult to add to the existing framework.

Upvotes: 0

Matjaz Lipus
Matjaz Lipus

Reputation: 711

From my experience node 0.2 SSL support is very flacky and unreliable. We use nginx as a proxy.

Upvotes: -1

Baggz
Baggz

Reputation: 17423

Node.js 0.3.4 has been released.

  • Primordal mingw build (Bert Belder)
  • HTTPS server
  • Built in debugger 'node debug script.js'
  • realpath files during module load (Mihai Călin Bazon)
  • Rename net.Stream to net.Socket
  • Fix process.platform

Example

var https = require('https');
var fs = require('fs');

var options = {
  key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
  cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};

https.createServer(options, function (req, res) {
  res.writeHead(200);
  res.end("hello world\n");
}).listen(8000);

Upvotes: 4

Ivo Wetzel
Ivo Wetzel

Reputation: 46745

Node 3.x is not supposed to be used in production, it's unstable, bleeding edge development. 2.6 still has the old SSL implementation, which works.

If you want to know when all the stuff gets finished, your best bet is to either ask on the Google Group, or Ryan on Twitter.

Upvotes: 1

Related Questions