diff --git a/test/disabled/tls_client.js b/test/disabled/tls_client.js index 6838c84e73..eba7a886c1 100644 --- a/test/disabled/tls_client.js +++ b/test/disabled/tls_client.js @@ -2,6 +2,7 @@ require('../common'); var sys=require('sys'); var net=require('net'); var fs=require('fs'); +var crypto=require('crypto'); //var client = net.createConnection(4443, "localhost"); var client = net.createConnection(443, "www.microsoft.com"); @@ -10,7 +11,7 @@ var client = net.createConnection(443, "www.microsoft.com"); var caPem = fs.readFileSync(fixturesDir+"/msca.pem"); //var caPem = fs.readFileSync("ca.pem"); -var credentials = net.createCredentials({ca:caPem}); +var credentials = crypto.createCredentials({ca:caPem}); client.setEncoding("UTF8"); client.addListener("connect", function () { diff --git a/test/disabled/tls_server.js b/test/disabled/tls_server.js index 6016ef711b..f89ee4b04a 100644 --- a/test/disabled/tls_server.js +++ b/test/disabled/tls_server.js @@ -3,11 +3,12 @@ require('../common'); var sys=require('sys'); var net=require('net'); var fs=require('fs'); +var crypto=require('crypto'); -var keyPem = fs.readFileSync(fixturesDir + "/test_key.pem"); +var keyPem = fs.readFileSync(fixturesDir + "/cert.pem"); var certPem = fs.readFileSync(fixturesDir + "/cert.pem"); -var credentials = net.createCredentials({key:keyPem, cert:certPem}); +var credentials = crypto.createCredentials({key:keyPem, cert:certPem}); var i = 0; var server = net.createServer(function (connection) { connection.setSecure(credentials); @@ -21,11 +22,11 @@ var server = net.createServer(function (connection) { sys.puts("recved: " + JSON.stringify(chunk)); connection.write("HTTP/1.0 200 OK\r\nContent-type: text/plain\r\nContent-length: 9\r\n\r\nOK : "+i+"\r\n\r\n"); i=i+1; - connection.close(); + connection.end(); }); connection.addListener("end", function () { - connection.close(); + connection.end(); }); });