Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// To cause warnings to be emitted, this needs to be run with:
//
// NODE_EXTRA_CA_CERTS=x.pem
//
// and x.pem having invalid pem, perhaps a beginning of a cert without an end
// line, see below. My goal was to cause something to be printed between the
// BEGIN and END, no success.
//
// -----BEGIN CERTIFICATE-----
function log(s) {
return function() {
process._rawDebug(s);
}
}
process.nextTick(log('A'));
new Promise(function(resolve) {
log('p enter')();
resolve();
}).then(log('p resolved'));
log('BEGIN')();
require('tls').createServer({})
log('END')();
process.nextTick(log('C'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment