Mysql ssl connection handshake error with specific ciphers

Viewed 94

I am trying to establish an SSL connection to MySQL (https://github.com/mysqljs/mysql#ssl-options) with Sequelize Dialect options (https://sequelize.org/docs/v6/other-topics/dialect-specific-things/) defined below:

dialectOptions: {
      ssl: {
        ca: fs.readFileSync(`${__dirname}/rds-combined-ca-bundle.pem`),
        ciphers: someTLSCiphers,
        minVersion: 'TLSv1.2',
      },
}

This doesn't work for me. I need to pass specific ciphers in the TLS and while I am able to setup a SSL connection with the below option, this doesn't satisfy my need to use these specific ciphers.

dialectOptions: {
  ssl: 'Amazon RDS'
}

I get this error message:

"error":"{\"name\":\"SequelizeConnectionError\",\"parent\":{\"library\":\"SSL routines\",\"function\":\"ssl3_read_bytes\",\"reason\":\"sslv3 alert handshake failure\",\"code\":\"HANDSHAKE_SSL_ERROR\",\"fatal\":true},\"original\":{\"library\":\"SSL routines\",\"function\":\"ssl3_read_bytes\",\"reason\":\"sslv3 alert handshake failure\",\"code\":\"HANDSHAKE_SSL_ERROR\",\"fatal\":true}}","level":"error","message":"Application failed to start due to error: 139893326490440:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1543:SSL alert number 40\n"

Can someone help me with this?

0 Answers
Related