Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvLaU-0001nV-7G for pgsql-admin@arkaria.postgresql.org; Thu, 30 Aug 2018 11:58:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fvLaR-00018c-P4 for pgsql-admin@arkaria.postgresql.org; Thu, 30 Aug 2018 11:58:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fvLaR-00018U-FY for pgsql-admin@lists.postgresql.org; Thu, 30 Aug 2018 11:58:07 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fvLaJ-0006Ex-FP for pgsql-admin@lists.postgresql.org; Thu, 30 Aug 2018 11:58:06 +0000 Received: by mail-wm0-x244.google.com with SMTP id y2-v6so1706455wma.1 for ; Thu, 30 Aug 2018 04:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=EXpqYdfC05y9UOCii1i47eioVRBqmDPRPkFmvDZlZGo=; b=ZWTgTCcookdWmYpBnGHZjZvQj86ywz9mrDN0RZxl0iHHS2Hp7vS6R9jKzC4X/vI2Bx 9sx9TxTGMeSYJYSVTgAWyWEBnF07CBDrwpNu5zX5af0TlnpHooeDr7sqFKC5uw04qoyZ suILKsdgeom0oheJ21F7YpDFJbE4qu//6zihwIRE+iuxZgzj2Jhlk8JMfoLHxdq4GkZJ 9Lpgj7mJM2QHKh5MqXGiVL4ThcuQjdlr9MHSjos8YsLS8mRpYhu3rNCVKJlsOS6n8Fdk tkfSC7pOKIPhxNNtQocyzK+lETe9M7CiF6zwxWhNyFgj1gMetpRYPwP8DcKR72YcUlFq pe5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=EXpqYdfC05y9UOCii1i47eioVRBqmDPRPkFmvDZlZGo=; b=I7dqK9XgxsIvNciv4TkL/BaWNk8XzOAkrrOcrvrfwZ632B3F0n2Z8tnENn6EMcd3wp E0OTVXy6ATxMM6JiF78yv1J79zjF8KEDavAA5zgzfIlG+oo9uz7A7Lk8iUyoBEwU+ZJx zccEvME/p9XWbGTshxvF4JjunR6X8IiMnSkMCx8gsFXYfOhLgS3Vh5NKh9n0Ytz30gKt 2dCRsZeYBsoPvwhRv6QLSfpIElT8YKYSQUFLNUiVqNbnyYAsaBIHF5udpnT7u8RNjHLX Qh+7KW9tvsXywABWXZdGsti7dBXKsTlJPas53JID/h94+EkU5G5p3vEvUn/qHSd9KqRL 5PKA== X-Gm-Message-State: APzg51DqcUcmyr2mPohVspTILiD4UJ6EN88SOjyk1hvjpMzsjZFGMHuf 6eU9ivnV6DgmN7bLzq/F4a/sR7h7/B8= X-Google-Smtp-Source: ANB0VdbCK0P+SpMyMuio6EnheWr7p5ZhczDGcoY9Q5VQR/cH3UM+xZJcRdqWwS2qHaxNThIZOieP+A== X-Received: by 2002:a1c:760d:: with SMTP id r13-v6mr1511993wmc.22.1535630277020; Thu, 30 Aug 2018 04:57:57 -0700 (PDT) Received: from LAPTOPE7EH7MDP (167.221-30-62.static.virginmediabusiness.co.uk. [62.30.221.167]) by smtp.gmail.com with ESMTPSA id k63-v6sm1826368wmd.46.2018.08.30.04.57.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 04:57:56 -0700 (PDT) From: "Mark Williams" To: "'Wim Bertels'" , "'Tim Cross'" Cc: , References: <032401d43326$6c275d80$44761880$@gmail.com> <034901d4333f$d2aa7650$77ff62f0$@gmail.com> <076401d43883$89ec6830$9dc53890$@gmail.com> <000e01d43e32$f35aad40$da1007c0$@gmail.com> <87efejihy9.fsf@gmail.com>,<013b01d43f00$527caf80$f7760e80$@gmail.com> <1535615748971.37236@ucll.be> In-Reply-To: <1535615748971.37236@ucll.be> Subject: RE: FW: Setting up SSL for postgre Date: Thu, 30 Aug 2018 12:57:54 +0100 Message-ID: <027801d44058$afa40a10$0eec1e30$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJ64nPKQfAewiPZ9t7gQ7SiT+1fnwIMhi/1AcD6KUcCiXXq5QDWmBXZAcT4CjwCSq7bNgG5QIOHAf1Z0v6jE0wGcA== Content-Language: en-gb List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I have finally discovered the problem and thanks to everyone for their help. I have changed the Pg_hha.conf file to md5 clientcert=1 instead of just cert. It still didn't work and I read a suggestion on a link provided by Wim which suggested change sslmode to verify-ca. This threw up a new error, namely that it couldn't find the root certificate at the location I had specified. The reason for this was that although my file path was being ready by FireDAC correctly, when it was passed through to Postgre, it was removing the path delimiters. The answer was to escape the delimiters with a backslash eg "c:\\pathtomycerts\\postgre.sql.cert" I'm assuming you guys are all on Linux and don't have this problem. For the benefit of future Windows users, who may be tempted to give up on Postgre due to the agony of trying to connect with SSL it would be well worth a little addition to the manual at https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONN STRING to let Windows users know they need to escape their path delimiters. I will let Embarcadero know of this issue for FireDAC users. Aside from that little niggle, it's great to know that Postgre users are so willing to help. Many thanks again. __ -----Original Message----- From: Wim Bertels Sent: 30 August 2018 08:56 To: Mark Williams ; 'Tim Cross' Cc: pgsql-admin@lists.postgresql.org; s.dunand@sirap.fr Subject: Re: FW: Setting up SSL for postgre Hallo Mark, in your pg_hha.conf you have used cert as authentication, which is authorization using a certificate (not a password) (as mailed before with documentation links) did you test pgadmin and firedac from the same client machine? hth, Wim ________________________________________ Van: Mark Williams Verzonden: dinsdag 28 augustus 2018 20:52 Aan: 'Tim Cross' CC: pgsql-admin@lists.postgresql.org; s.dunand@sirap.fr; Wim Bertels Onderwerp: RE: FW: Setting up SSL for postgre Hi Tim, Thanks for the reply. Unfortunately, I don't know what private certificate authorisation is. I assume this is different to SSL and is not the same as a self signed cert. I have created my certificate with OpenSSL so I assume I am not in the arena of private certificate authorisation. Thanks for the tip re Debian, but sadly client and server are all Windows machines. I think I will put a plea out there to anyone who uses FireDAC and has managed to get SSL working with Postgre. Absent anything useful there, I will give up on Postgre. All the best. Mark __ -----Original Message----- From: Tim Cross Sent: 27 August 2018 23:05 To: Mark Williams Cc: pgsql-admin@lists.postgresql.org; s.dunand@sirap.fr Subject: Re: FW: Setting up SSL for postgre Mark Williams writes: > > > > > __ > > > > From: Mark Williams > Sent: 25 August 2018 18:14 > To: 'Wim Bertels' > Subject: RE: Setting up SSL for postgre > > > > Hi Wim, > > > > I don't understand. If I don't include the password option, the > connection will be refused because I have not included it. > > > > I am connecting via PGAdmin with the same user ie postgres. > I suspect Wim was referring to private certificate authentication rather than connections over SSL - use the same basic technologies, but for different goals. While it may or may not be useful, I believe that recent versions of Debian actually come with SSL connections enabled by default (using self signed cert). Might provide the example you need? Tim -- Tim Cross =