question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSL support does not work with Node v12+

See original GitHub issue

When using Node v12+ you will always get an error when trying to connect with SSL.

SSL routines:ssl_choose_client_version:unsupported protocol

The minimum TLS version in node 12 is 1.2, and this module needs to add support for this.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
sidorarescommented, Sep 22, 2020

While above error might be probably solved with added entry to exports, I would prefer to change all deep requires to top level import + property or getters Some things to consider while doing this:

  • avoid impact on startup time and memory ( getters and lazy require vs requiring everything upfront )
  • need to think about good and consistent names. possible future examples:
import mysql from 'mysql2'

mysql.constants.commandCodes.COM_QUIT; // instead of require('mysql2/lib/constants/commands.js')
mysql.sslProfiles['Amazon RDS']; //  instead of require('mysql2/lib/constants/ssl_profiles')
mysql.constants.capabilityFlags.SSL_VERIFY_SERVER_CERT; // instead of require('mysql2/lib/constants/client.js')
2reactions
jjosefcommented, Dec 17, 2019

Seems like a good idea, I think just adding some documentation on this for supporting older MySQL versions in newer node versions would suffice, and improving how to load the Amazon RDS cert.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tls-v1.0 flag doesn't work on Node v12 · Issue #27384 - GitHub
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 ,...
Read more >
Nodemailer 6.1.1 not working with NodeJs >=12
The reason this is failing as of Node 12 is because Node Version 12 has finally disabled TLS 1.0 support. Unfortunately our test...
Read more >
TLS (SSL) | Node.js v19.3.0 Documentation
TLS-PSK support is available as an alternative to normal certificate-based authentication. It uses a pre-shared key instead of certificates to authenticate a ...
Read more >
Node.js - endoflife.date
Release Released Active Support Se... 19 2 months and 1 week ago. (18 Oct 2022) Ends in 3 months. (01 Apr 2023) En... 18 (...
Read more >
Download & Update Node.js to the Latest Version! Node v19 ...
Node.js 18 will be supported until April 2025. ... a security release as the issues addressed in OpenSSL 3.0.3 slightly affect Node.js 18....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found