Skip to content

Instantly share code, notes, and snippets.

@chetandhembre
Created April 29, 2015 18:22
Show Gist options
  • Select an option

  • Save chetandhembre/68187bbb49948869fbe6 to your computer and use it in GitHub Desktop.

Select an option

Save chetandhembre/68187bbb49948869fbe6 to your computer and use it in GitHub Desktop.
tlsVsSslv3
var fs = require('fs');
var tls = require('tls');
var constants = require('constants');
var options = {
key: fs.readFileSync('tlsVsSslve-private.pem'),
cert: fs.readFileSync('tlsVsSslv3-cert.pem'),
secureProtocol: 'TLSv1_method',
secureOptions: constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_SSLv2,
};
tls.createServer(options, function (s) {
s.write("test\n");
s.pipe(s);
}).listen(8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment