Node: --tls-v1.0 flag doesn't work on Node v12

Created on 24 Apr 2019  路  6Comments  路  Source: nodejs/node

Hi,
I'm trying to migrate to v12, but sadly there are some breaking changes for our use case.
We aggregate content from thousands of websites and some of them still do not support tls v1.2

I tried passing the --tls-v1.0 flag like mentioned here tls: disable TLS v1.0 and v1.1 by default, like this node --tls-v1.0 run.js, but it didn't help.
I'm getting the following error message:
request to https://rss.adnkronos.com/RSS_PrimaPagina.xml failed, reason: write EPROTO 4562253248:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1922:

Any suggestions?

https tls

Most helpful comment

Try with --tls-min-v1.0, it should work.

All 6 comments

Try with --tls-min-v1.0, it should work.

@lpinca Thanks, it worked!

It was not clear from the changelog, as disable TLS v1.0 and v1.1 by default point to a commit with a different flag. And the actual relevant flag is here I think TLS1.3 support

Yes you are right. https://nodejs.org/api/cli.html and node --help are more reliable resources.
I'm going to close this, please let me know if this should stay open.

So happy you guys allowed us to use this flag.

Please don't forget those who do not have control over the sites we need to connect to.

馃檹 馃檹 馃檹 馃檹 馃檹

Try with --tls-min-v1.0, it should work.

@lpinca Could you also guide us on how to use --tls-min-v1.0 when using ts-node?

@hyochan You can handle it like

NODE_ENV=development node --tls-min-v1.0 -r ts-node/register src/main.ts
Was this page helpful?
0 / 5 - 0 ratings