Search Postgresql Archives

Re: Force ssl connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/10/2013 03:20 AM, Muhammad Bashir Al-Noimi wrote:
On Wed, Jul 10, 2013 at 12:16 PM, Magnus Hagander <magnus@xxxxxxxxxxxx> wrote:
requiressl=0 doesn't mean what you think it means, and that's one
reason it has been deprecated since at least 8.2.

requiressl=0 means "negotiate. use ssl if the server asks for it, but
accept not using ssl". So this will connect without an error both with
and without ssl.

If you want to enforce ssl, use sslmode=require.
If you want to enforce non-ssl, use sslmode=disable.


This is exactly what I'm looking for... thanks a lot it works perfectly.

Which is what you had if you followed your own comments:)

db.setHostName("192.168.0.74");
db.setPort(5433);
// set requiressl=1 to enable SSL <--------
db.setConnectOptions("requiressl=0");


--
Best Regards
Muhammad Bashir Al-Noimi



--
Adrian Klaver
adrian.klaver@xxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux