Skip to content

Instantly share code, notes, and snippets.

@machadogj
Created September 26, 2012 17:27
Show Gist options
  • Save machadogj/3789357 to your computer and use it in GitHub Desktop.
Save machadogj/3789357 to your computer and use it in GitHub Desktop.
HTTPS With SNI not working on IE9
var https = require('https');
var fs = require('fs');
var crypto = require("crypto");
var options = {
SNICallback: function (hostname) {
console.log('hostname: ' + hostname);
return crypto.createCredentials({
key: fs.readFileSync('default.key'),
cert: fs.readFileSync('default.crt')
}).context;
}
};
https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello world\n");
}).listen(8001);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment