-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
SSL / TLS #25
Comments
Hey Paul, SSL should be supported "out of the box" with the libpq bindings. http://www.postgresql.org/docs/8.1/static/libpq-ssl.html Would you try it out using OR...you can send a pull request with the functionality yourself. ;) |
I can confirm that switching to the native bindings solved the SSL problem for me. If you want to replicate the issue, create a free Heroku account and PSQL db with heroku and try connecting to it. If you don't use the native bindings, you get:
|
yeah I really need to get SSL working with the pure javascript bindings. |
I haven't tried, but according to the documentation (and by looking at an existing SSL/TLS-enabled PostgreSQL connection made with libpq, via Wireshark), the connection looks as follows:
(As a side-node, just wondering why you really need SSL working with the pure JS bindings when it should work out of the box via libpq, itself available on most platforms. I guess it can't harm to have it, though...) |
I've just added this pull request with initial support for what I was saying in my previous comment. I've tried it for a basic query, and it works. It might need further tweaking, though. |
This works now. |
@brianc, On AWS RDS, how does the automatic ssl look up work? Don't I need to provide where to look up certs?? |
If you're using the native bindings, they do a lot of the SSL stuff for you. http://www.postgresql.org/docs/9.3/static/libpq-ssl.html If you're using the javascript version, you'll pass an |
Hey Brian, I am using the native binding. I didn't realize they do all the cert checking etc for me. That's awesome! Thanks |
* Pool.query calls cb if connect() fails Old behavior was that if connect called back with an error, the promise would get rejected but the cb function would never get called. * Test that Pool.query passes connection errors to callback * Fixes to standardjs compliance
The connection string now supports the following parameters: - sslcert - sslkey - sslrootcert Fixes #25.
Hi,
im working on a project where I need SSL connection to PostgreSQL.
Could you implement this functionality?
Thanks
Paul from Germany
The text was updated successfully, but these errors were encountered: