felixge/node-mysql — pull request #729 by sidorares (2014-02-05 01:11:22+00:00)
Title: SSL support

this is still WIP, but please review
see also #481

I'm able to connect to connect to amazon rds using ssl:

```
var conn = require('node-mysql').createConnection({
host : 'xxxx.xxxxx.ap-southeast-2.rds.amazonaws.com',
user : 'xxxx',
password : 'xxxx',
port : '3306',
database : 'xxx',
ssl : 'Amazon RDS'
});

conn.query("show status like 'Ssl_cipher';", console.log);
```
output:
```
null [ { Variable_name: 'Ssl_cipher', Value: 'AES256-SHA' } ] [ { catalog: 'def',
db: 'information_schema',
table: 'STATUS',
orgTable: 'STATUS',
name: 'Variable_name',
orgName: 'VARIABLE_NAME',
filler1: ,
charsetNr: 33,
length: 192,
type: 253,
flags: 1,
decimals: 0,
filler2: ,
default: undefined,
zeroFill: false,
protocol41: true },
{ catalog: 'def',
db: 'information_schema',
table: 'STATUS',
orgTable: 'STATUS',
name: 'Value',
orgName: 'VARIABLE_VALUE',
filler1: ,
charsetNr: 33,
length: 3072,
type: 253,
flags: 0,
decimals: 0,
filler2: ,
default: undefined,
zeroFill: false,
protocol41: true } ]
```
Things left to do:
- documentation
- connect/disconnect streams2 properly using unpipe/pipe ( see TODO comments in the code )

otherwise it looks like ssl is fully functional