2 var https = require("https")
3 var options = { key: fs.readFileSync("./server.key")
4 , cert: fs.readFileSync("./server.crt") }
6 var server = https.createServer(options, function (req, res) {
13 var ca = fs.readFileSync("./ca.crt")
14 var agent = new https.Agent({ host: "localhost", port: 1337, ca: ca })
16 https.request({ host: "localhost"
19 , headers: { host: "testing.request.mikealrogers.com" }
22 , path: "/" }, function (res) {
23 if (res.client.authorized) {
24 console.log("node test: OK")
26 throw new Error(res.client.authorizationError)