node-mysql2
node-mysql2 copied to clipboard
[SSL Problem] Trying to connect with protocol TLSv1 raise an issue
I tried mapping configuration from DataGrip in my mysql config, but I'm blocked by "message": "005074D801000000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:../deps/openssl/openssl/ssl/statem/extensions.c:922:\n"
In the Datagrip I enabled SSL and set "-Djdk.tls.disabledAlgorithms=SSLv3, TLSv1" which works perfectly.
I create in code sth like:
const poolConnection = mysql.createPool({
host: env.DB_HOST,
user: env.DB_USER,
database: env.DB_NAME,
password: env.DB_PWD,
port: Number(env.DB_PORT),
ssl: {
minVersion: 'TLSv1.1',
rejectUnauthorized: false,
}
});
But without corrected result. I tried to put some maxVersion, verification, but nothing works. I tried to set OPENSSL_CONF but nothing happens. I don't know if this is problem from mysql2 driver, or this is related with Node.js.
I will be glad for some help.