GAE & Cloud SQL : "Server does not support secure connection"

147 views
Skip to first unread message

daxro via StackOverflow

unread,
Dec 13, 2016, 11:06:05 AM12/13/16
to google-appengin...@googlegroups.com

I've deployed a node.js-app to GAE and my SQL-db is on Google Cloud SQL.

It worked out fine, but when enabling SSL I get the following error message: Server does not support secure connection.

I have:

  • Followed the step-by-step here
  • Switched on 'only allow SSL' in my Cloud SQL settings

Any lead on what is going on is much appreciated.

connection

function getConnection () {
const options = {
user: 'root',
password: 'pwd',
database: 'dbname',
socketPath: '/cloudsql/project-name:us-central1:name',
ssl: {
   ca: fs.readFileSync(__dirname + '/server-ca.pem'),
   cert: fs.readFileSync(__dirname + '/client-cert.pem'),
   key: fs.readFileSync(__dirname + '/client-key.pem')
}
};

From Handshake.js in npm mysql

Handshake.prototype['HandshakeInitializationPacket'] = function(packet) {
  this._handshakeInitializationPacket = packet;

  this._config.protocol41 = packet.protocol41;

  var serverSSLSupport = packet.serverCapabilities1 & ClientConstants.CLIENT_SSL;

  if (this._config.ssl) {
    if (!serverSSLSupport) {
      var err = new Error('Server does not support secure connection');

      err.code = 'HANDSHAKE_NO_SSL_SUPPORT';
      err.fatal = true;

      this.end(err);
      return;
    }


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/41125380/gae-cloud-sql-server-does-not-support-secure-connection
Reply all
Reply to author
Forward
0 new messages