Created
October 19, 2016 18:20
-
-
Save sam-github/927a451526de55847d53694b53b01a20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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