Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow node.js to use tls1.0 for db connection #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benfriebe
Copy link
Member

Issue #, if available:

Description of changes:
Add node option to lower the minimum tls version to 1.0, which is required when running with a MySQL 5.6 DB.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@obscurerichard
Copy link

obscurerichard commented May 14, 2022

I just completed https://github.com/aws-samples/aws-serverless-security-workshop/tree/master/docs/04-ssl-in-transit on 2022-05-14 and can confirm that without this change, you would encounter errors of this form for any function that makes a connection to the Aurora RDS MySQL 5.6 database:

2022-05-14T19:19:02.255Z e8406f2b-9dbf-4db2-9977-90e556a0b18e ERROR Error: 140614325852032:error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_lib.c:1958:

--------------------
at Protocol._enqueue (/var/task/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/var/task/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/var/task/node_modules/mysql/lib/Connection.js:116:18)
at Connection._implyConnect (/var/task/node_modules/mysql/lib/Connection.js:454:10)
at Connection.query (/var/task/node_modules/mysql/lib/Connection.js:196:8)
at /var/task/dbUtils.js:25:24
at new Promise (<anonymous>)
at query (/var/task/dbUtils.js:24:16)
at processTicksAndRejections (internal/process/task_queues.js:95:5) {
library: 'SSL routines',
function: 'ssl_choose_client_version',
reason: 'unsupported protocol',
code: 'HANDSHAKE_SSL_ERROR',
fatal: true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants