<div dir="ltr">HI <span style="font-size:12.8000001907349px">Christian.</span><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks for pointing out the issue. Handling of certification chain was missing from <span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1"></span><span class="" id=":2bc.1" tabindex="-1">pgpool</span>-II, so it was not honoring the intermediate certificates. </span><span style="font-size:12.8000001907349px">I have pushed the fix</span><span style="font-size:12.8000001907349px"> in all branches from pgpool-II V3.0 onward.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><a href="http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=85e7862ddc6ee16ed98d29a6ac560c03bcd94fb4">http://git.<span class="" id=":2bc.3" tabindex="-1">postgresql</span>.org/<span class="" id=":2bc.4" tabindex="-1">gitweb</span>/?p=pgpool2.git;a=commit;h=85e7862ddc6ee16ed98d29a6ac560c03bcd94fb4</a></span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks</span></div><div><span style="font-size:12.8000001907349px">Kind regards!</span></div><div><span style="font-size:12.8000001907349px">Muhammad <span class="" id=":2bc.5" tabindex="-1">Usama</span></span></div><div><span style="font-size:12.8000001907349px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 25, 2014 at 8:44 PM, Christian Affolter <span dir="ltr">&lt;<a href="mailto:c.affolter@stepping-stone.ch" target="_blank">c.affolter@stepping-stone.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
thanks for your help. According to the documentation [1] &quot;ssl_ca_cert&quot;<br>
and &quot;ssl_ca_cert_dir&quot; are used for backend server (PostgreSQL)<br>
certificate verification. Nevertheless, I gave it a shot without success.<br>
<br>
Regards<br>
Christian<br>
<br>
<br>
[1] <a href="http://www.pgpool.net/docs/latest/pgpool-en.html#SSL_CA_CERT" target="_blank">http://www.pgpool.net/docs/latest/pgpool-en.html#SSL_CA_CERT</a><br>
<div class="HOEnZb"><div class="h5"><br>
On 25.11.2014 16:12, Lachezar Dobrev wrote:<br>
&gt;   Shouldn&#39;t you be using<br>
&gt;    ssl_ca_cert = &#39;/etc/ssl/pgpoop2/ALL-CAs.pem&#39;<br>
&gt;<br>
&gt;   Instead of the<br>
&gt;    ssl_ca_cert_dir = &#39;...&#39;<br>
&gt;<br>
&gt;<br>
&gt; 2014-11-25 12:46 GMT+02:00 Christian Affolter &lt;<a href="mailto:c.affolter@stepping-stone.ch">c.affolter@stepping-stone.ch</a>&gt;:<br>
&gt;&gt; Dear pgpool users<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m running pgpool-II 3.4.0 with enabled SSL support (between the client<br>
&gt;&gt; and the pgpool daemon). The SSL certificate is signed by an official<br>
&gt;&gt; certificate authority.<br>
&gt;&gt;<br>
&gt;&gt; The path to the SSL root CA certs is set and SSL verification is activated:<br>
&gt;&gt; PGSSLROOTCERT=&quot;/etc/ssl/certs/ca-certificates.crt&quot;<br>
&gt;&gt; PGSSLMODE=&quot;verify-full&quot;<br>
&gt;&gt;<br>
&gt;&gt; Whenever I try to connect to the pgpool-II server with the psql client,<br>
&gt;&gt; I get a &quot;psql: SSL error: certificate verify failed&quot; error.<br>
&gt;&gt;<br>
&gt;&gt; ca-certificates.crt contains the correct Root CA certificate.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The chain of trust looks as follows:<br>
&gt;&gt; Certificate -&gt; Intermediate CA 1 -&gt; Intermediate CA 2 -&gt; Root CA<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The SSL connection settings of pgpool.conf:<br>
&gt;&gt;<br>
&gt;&gt; ssl = on<br>
&gt;&gt; ssl_key  = &#39;/etc/ssl/pgpool2/host.example.com.key.pem&#39;<br>
&gt;&gt; ssl_cert = &#39;/etc/ssl/pgpool2/host.example.com.bundle.pem&#39;<br>
&gt;&gt; #ssl_ca_cert = &#39;&#39;<br>
&gt;&gt; ssl_ca_cert_dir = &#39;/etc/ssl/certs&#39;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &quot;host.example.com.key.pem&quot; contains the private key whereas<br>
&gt;&gt; &quot;host.example.com.bundle.pem&quot; contains the x509 certificate and all<br>
&gt;&gt; involved CA certificates. It was created in the following order:<br>
&gt;&gt;<br>
&gt;&gt; cat host.example.com.cert.pem   &gt;  host.example.com.bundle.pem<br>
&gt;&gt; cat Intermediate-CA-1.cert.pem  &gt;&gt; host.example.com.bundle.pem<br>
&gt;&gt; cat Intermediate-CA-2.cert.pem  &gt;&gt; host.example.com.bundle.pem<br>
&gt;&gt; cat Root-CA.cert.pem            &gt;&gt; host.example.com.bundle.pem<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; The verification works correct, if I explicitly create a CA file with<br>
&gt;&gt; all CAs involved: PGSSLROOTCERT=/etc/ssl/pgpool2/All-CAs.pem psql ...<br>
&gt;&gt;<br>
&gt;&gt; Furthermore, I can use the same &quot;host.example.com.bundle.pem&quot; file<br>
&gt;&gt; within the PostgreSQL server, with only the Root CA known to the client<br>
&gt;&gt; (the original command).<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Does anyone know on how to correctly deal with intermediate CA<br>
&gt;&gt; certificates within pgpool-II, so that pgpool sends the intermediate<br>
&gt;&gt; certificates along with the server certificate?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Many thanks in advance<br>
&gt;&gt; Christian<br>
<br>
_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</div></div></blockquote></div><br></div>