From 76c5bbebe583cda8647cc5db9d0a49434f0aee7a Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Tue, 3 May 2011 09:06:17 -0600 Subject: [PATCH] the verifier should use https when appropriate (port 443) --- verifier/server/idassertion.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/verifier/server/idassertion.js b/verifier/server/idassertion.js index 6fb36993e..1099fe11d 100644 --- a/verifier/server/idassertion.js +++ b/verifier/server/idassertion.js @@ -8,6 +8,7 @@ const jwt = require('./jwt.js'); const xml2js = require("xml2js/lib/xml2js"); const http = require("http"); +const https = require("https"); const url = require("url"); const rsa = require("./rsa.js"); @@ -87,7 +88,9 @@ var Webfinger = (function() { }; try { console.log("Requesting host-meta for " + options.host + ":" + options.port + " (" + domain + ")"); - var req = http.request(options, function(res) { + + var scheme = options.port == "443" ? https : http; + var req = scheme.request(options, function(res) { res.setEncoding('utf8'); var buffer = ""; var offset = 0; @@ -156,7 +159,8 @@ var Webfinger = (function() { }; console.log("Verifier: loading " + JSON.stringify(options)); - var req = http.request(options, function(res) { + var scheme = options.port == "443" ? https : http; + var req = scheme.request(options, function(res) { res.setEncoding('utf8'); var buffer = ""; var offset = 0; -- GitLab