Re: Force ssl connection

From: Muhammad Bashir Al-Noimi <mbnoimi(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Force ssl connection
Date: 2013-07-10 10:04:56
Message-ID: CABpATRvDzjx5jCknHZHdszm=m+BY6BzofGM8oyb_LhbP2GSWbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 9, 2013 at 11:21 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> From your original email:
> db.setHostName("localhost");
>
> So localhost is probably matching "127.0.0.1/32" or "::1/128", which
> are explicitly allowed.

I'm using this and still able to connect without SSL

db.setHostName("192.168.0.74");
db.setPort(5433);
// set requiressl=1 to enable SSL
db.setConnectOptions("requiressl=0");
db.setDatabaseName("testDB");
db.setUserName("postgres");
db.setPassword("****");
if (!db.open())
qDebug() << "Unable to connect!";
else
qDebug() << "connected.";

--
Best Regards
Muhammad Bashir Al-Noimi

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emre ÖZTÜRK 2013-07-10 10:16:13 Single Line Query Logging
Previous Message Muhammad Bashir Al-Noimi 2013-07-10 09:59:27 Re: Force ssl connection