this code
var link = "https://www.unicko.com/";
link = "https://www.eloquens.com/"; // or this link
https.get(link, (res) => {
console.log('statusCode:', res.statusCode);
console.log('headers:', res.headers);
res.on('data', (d) => {
process.stdout.write(d);
});
}).on('error', (e) => {
console.error(e);
});
in node 6.x is working well
in node 8.x emit error
{ Error: write EPROTO 139838109423424:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/s23_clnt.c:802:
at _errnoException (util.js:992:11)
at WriteWrap.afterWrite [as oncomplete] (net.js:864:14) code: 'EPROTO', errno: 'EPROTO', syscall: 'write' }
These web sites have a A+ rating in ssllabs
https://www.ssllabs.com/ssltest/analyze.html?d=www.unicko.com&hideResults=on
Have you searched the bug tracker for EPROTO? This has come up a few times, with different causes.
ok, quick inline fix
require("tls").DEFAULT_ECDH_CURVE = "auto"
https://github.com/nodejs/node/issues/16196#issuecomment-393091912
FWIW node v10.x already has a default of 'auto'
for require('tls').DEFAULT_ECDH_CURVE
.
Actually the require("tls").DEFAULT_ECDH_CURVE = "auto" is not solving the issue, nodejs version 8.9.3.
any clues?
Most helpful comment
ok, quick inline fix
https://github.com/nodejs/node/issues/16196#issuecomment-393091912