This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Description
I'm currently using dm/do to connect to a postgresql server with ssl enabled with enforced client certificates.
After scouring the internet and finding the mysql ssl settings in the wiki (https://github.com/datamapper/do/wiki/MySQL), it seems that no such options exist for do_postgres.
Luckily, the low level driver will still happily use ENV variables set in ruby, but passing these in the hash (or on the url like connection string) would be ideal.
For the sake of reference:
Here's a sample pgsql command like from 9.2 with the newer style connection string options:
psql "sslmode=verify-ca user=myuser hostaddr=10.10.10.40 dbname=mydb sslcert=/srv/postgresql/client.crt sslkey=/srv/postgresql/client.key sslrootcert=/srv/postgresql/ca.crt"
Here are the relevant ENV/connection string variables for SSL connections from http://www.postgresql.org/docs/9.2/static/libpq-envars.html:
- PGSSLMODE behaves the same as the sslmode connection parameter.
- PGSSLCOMPRESSION behaves the same as the sslcompression connection parameter.
- PGSSLCERT behaves the same as the sslcert connection parameter.
- PGSSLKEY behaves the same as the sslkey connection parameter.
- PGSSLROOTCERT behaves the same as the sslrootcert connection parameter.
- PGSSLCRL behaves the same as the sslcrl connection parameter.