When I specify rejectUnauthorized=true and verifyIdentity=false, I still get an error:
const ca = readFileSync(path.join(__dirname, `/ssl-ca/amazon-root-ca-1.pem`)).toString() // RDS Proxy
pool = await createConnection({
host,
user,
password,
database,
port,
ssl: {
ca,
rejectUnauthorized: true,
verifyIdentity: false
}
})
When I specify rejectUnauthorized=true and verifyIdentity=false, I still get an error:
Hostname/IP does not match certificate's altnames: ...So it seems like
verifyIdentitydoes not have any effect. Looking at the code it seems like lib/connection.js line 372 is unreachable:https://github.com/sidorares/node-mysql2/blob/1d983fa46031a77c689faea5f69e6e0baa1b3de7/lib/connection.js#L372C19-L372C19