support ssl params for pg-native (#1169)
Make pg-native able to pass sslmode, sslca, sslkey and sslcert params to libpq
This commit is contained in:
parent
0e2625b74e
commit
4505ae98d9
@ -79,6 +79,12 @@ ConnectionParameters.prototype.getLibpqConnectionString = function(cb) {
|
||||
add(params, this, 'application_name');
|
||||
add(params, this, 'fallback_application_name');
|
||||
|
||||
var ssl = typeof this.ssl === 'object' ? this.ssl : {sslmode: this.ssl};
|
||||
add(params, ssl, 'sslmode');
|
||||
add(params, ssl, 'sslca');
|
||||
add(params, ssl, 'sslkey');
|
||||
add(params, ssl, 'sslcert');
|
||||
|
||||
if(this.database) {
|
||||
params.push("dbname='" + this.database + "'");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user