With the recent update of openssl and nodejs, connecting to Google Cloud SQL over SSL is no longer possible from NodeJS. The openssl version that the tls library in node 0.12.6 now rejects any SSL keys with a DH key length of 512 or 1024. However Google Cloud SQL does not allow me to generate/upload my own SSL private keys, and the automatically generated one seems to be rejected.
When I try to connect to Cloud SQL I get the following error message:
Error: 140735270576896:error:14082174:SSL routines:SSL3_CHECK_CERT_AND_ALGORITHM:dh key too small:../deps/openssl/openssl/ssl/s3_clnt.c:3377:
I am using the node-mysql2
library to connect
There is a possible duplicate of this problem here: SSL operation failed with code 1: dh key too small However they don't discuss the solution to the problem.