You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
458 B

var common = require('../common');
var tls = require('tls');
var fs = require('fs');
// most servers don't require certificates
var options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
};
var s = tls.connect(443, "joyent.com", options, function() {
if (!s.authorized) {
console.error("CONNECTED: " + s.authorizationError);
s.destroy();
return;
}
s.pipe(process.stdout);
process.openStdin().pipe(s);
});