Created
April 29, 2015 18:22
-
-
Save chetandhembre/68187bbb49948869fbe6 to your computer and use it in GitHub Desktop.
tlsVsSslv3
This file contains hidden or 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
| var fs = require('fs'); | |
| var tls = require('tls'); | |
| var constants = require('constants'); | |
| var options = { | |
| key: fs.readFileSync('tlsVsSslve-private.pem'), | |
| cert: fs.readFileSync('tlsVsSslv3-cert.pem'), | |
| secureProtocol: 'TLSv1_method', | |
| secureOptions: constants.SSL_OP_NO_SSLv3 | constants.SSL_OP_NO_SSLv2, | |
| }; | |
| tls.createServer(options, function (s) { | |
| s.write("test\n"); | |
| s.pipe(s); | |
| }).listen(8000); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment