Created
September 26, 2012 17:27
-
-
Save machadogj/3789357 to your computer and use it in GitHub Desktop.
HTTPS With SNI not working on IE9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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