Skip to content

Instantly share code, notes, and snippets.

@Mutjake
Created July 25, 2016 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mutjake/115b91f21de4387e28e1eff990ad25a1 to your computer and use it in GitHub Desktop.
Save Mutjake/115b91f21de4387e28e1eff990ad25a1 to your computer and use it in GitHub Desktop.
Node test stub for trytls
var https = require('https');
var fs = require('fs');
var options = {
host: process.argv[2],
port: process.argv[3],
};
if(process.argv.length === 5) {
options.cert = fs.readFileSync(process.argv[4], 'ascii');
}
var req = https.request(options, function(res) {
res.on('data', function(d) {
process.stdout.write("VERIFY SUCCESS\n");
});
});
req.on('error', function(e) {
process.stdout.write("VERIFY FAILURE\n");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment