<div dir="ltr">Hi<br><br>I have looked into the patch and here are my two cents.<br><br>1- Does the &quot;Certificate Revocation List (CRL)&quot; have any effect if we do not configure CA certificates? <br>Meaning what would be the behavior of the system if someone specifies &quot;ssl_crl_file&quot; but leave out the ssl_ca_cert config?<br><br><br>2- In the patch you are loading the Certificate Revocation List after configuring<br>SSL library to ask for client certificates<br>i.e after calling SSL_CTX_set_verify and SSL_CTX_set_client_CA_list functions<br><br>Although I am not able to find any related SSL documentation on the<br>subject and not sure if it can cause any problem. But in the normal sequence, we always load<br>the CA and other certificated before SSL_CTX_set_verify and SSL_CTX_set_client_CA_list functions.<br><br>So I guess the safe bet is to move the loading of Certificate Revocation List before<br>SSL_CTX_set_verify.<br><br>3- The comment /* OpenSSL 0.96 does not support X509_V_FLAG_CRL_CHECK */ mentions <br>OpenSSL version as 0.96, which is wrong and should be 0.9.6<br><br>4- In the test case you are only exporting PGSSLCERT and PGSSLKEY environment variables<br>that means the test case will try to pick up the root certificate from the default location<br>and on the systems where the root certificate would not be found there, the test case will fail.<br><br>So I think you need to modify the test case and use PGSSLROOTCERT environment variable to<br>explicitly specify the root certificate as well.<br><div><br></div>These comments are on top of Ishii-San&#39;s review comments.<div><span style="background-color:rgb(222,244,255);color:rgb(25,30,36);font-family:Consolas,Monaco,&quot;Courier New&quot;,monospace;font-size:13.125px"><br></span></div>Thanks<br>Best Regards<br>Muhammad Usama<div><span style="background-color:rgb(222,244,255);color:rgb(25,30,36);font-family:Consolas,Monaco,&quot;Courier New&quot;,monospace;font-size:13.125px"><br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020 at 12:11 PM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Umar,<br>
<br>
Any update on this?<br>
<br>
From: Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt;<br>
Subject: [pgpool-hackers: 3523] Re: [PATCH] Feature: Support for CRL (Certificate Revocation List)<br>
Date: Fri, 28 Feb 2020 14:27:55 +0900 (JST)<br>
Message-ID: &lt;<a href="mailto:20200228.142755.205379439290164558.t-ishii@sraoss.co.jp" target="_blank">20200228.142755.205379439290164558.t-ishii@sraoss.co.jp</a>&gt;<br>
<br>
&gt; Here are comments on your patch.<br>
&gt; <br>
&gt; - There are some extra trailing spaces.<br>
&gt; <br>
&gt; $ git apply ~/crl_support_with_testcase.diff <br>
&gt; /home/t-ishii/crl_support_with_testcase.diff:42: trailing whitespace.<br>
&gt;       Specifies the name of the file containing the SSL server <br>
&gt; /home/t-ishii/crl_support_with_testcase.diff:43: trailing whitespace.<br>
&gt;       certificate revocation list (CRL). The default is empty, <br>
&gt; /home/t-ishii/crl_support_with_testcase.diff:199: new blank line at EOF.<br>
&gt; +<br>
&gt; warning: 3 lines add whitespace errors.<br>
&gt; <br>
&gt; - The pached source code compililes without any error.<br>
&gt; <br>
&gt; - the regression test (024.cert_auth) failed.<br>
&gt; <br>
&gt; ./regress.sh 024<br>
&gt; creating pgpool-II temporary installation ...<br>
&gt; moving pgpool_setup to temporary installation path ...<br>
&gt; moving watchdog_setup to temporary installation path ...<br>
&gt; using pgpool-II at /home/t-ishii/work/Pgpool-II/current/pgpool2/src/test/regression/temp/installed<br>
&gt; *************************<br>
&gt; REGRESSION MODE          : install<br>
&gt; PGPOOL-II                : /home/t-ishii/work/Pgpool-II/current/pgpool2/src/test/regression/temp/installed<br>
&gt; PostgreSQL bin           : /usr/local/pgsql/bin<br>
&gt; PostgreSQL Major version : 12<br>
&gt; pgbench                  : /usr/local/pgsql/bin/pgbench<br>
&gt; PostgreSQL jdbc          : /usr/local/pgsql/share/postgresql-9.2-1003.jdbc4.jar<br>
&gt; *************************<br>
&gt; testing 024.cert_auth...failed.<br>
&gt; out of 1 ok:0 failed:1 timeout:0<br>
&gt; <br>
&gt; This is Ubuntu 18.04.4 LTS.<br>
&gt; <br>
&gt; $ openssl version<br>
&gt; OpenSSL 1.1.1  11 Sep 2018<br>
&gt; <br>
&gt; Please find attached log file for the<br>
&gt; regression test.<br>
&gt; <br>
&gt; Best regards,<br>
&gt; --<br>
&gt; Tatsuo Ishii<br>
&gt; SRA OSS, Inc. Japan<br>
&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt; <br>
&gt;&gt; Hi Umar,<br>
&gt;&gt; <br>
&gt;&gt; I seemed to miss your last email. I will take care your patch<br>
&gt;&gt; tomorrow morning.<br>
&gt;&gt; <br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt; <br>
&gt;&gt;&gt; Hi Tatsuo,<br>
&gt;&gt;&gt; Any update for last patch?<br>
&gt;&gt;&gt; I will be sending more patches in the same area of SSL ( for few other<br>
&gt;&gt;&gt; features ) and the those patches might create conflict on merge.<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt; Umar Hayat<br>
&gt;&gt;&gt; Principal Software Engineer<br>
&gt;&gt;&gt; EnterpriseDB: <a href="https://www.enterprisedb.com" rel="noreferrer" target="_blank">https://www.enterprisedb.com</a><br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt; On Wed, Feb 19, 2020 at 1:39 PM Umar Hayat &lt;<a href="mailto:m.umarkiani@gmail.com" target="_blank">m.umarkiani@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; <br>
&gt;&gt;&gt;&gt; Hi Tatsuo,<br>
&gt;&gt;&gt;&gt; Please find the attached updated patch with following changes:<br>
&gt;&gt;&gt;&gt; 1. Updated the description of &#39;*ssl_crl_file&#39;* configuration variable.<br>
&gt;&gt;&gt;&gt; 2. Updated test case &#39;024.cert_auth&#39; which verify valid CRL and invalid<br>
&gt;&gt;&gt;&gt; CRL ( CRL with revocation entry )<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt;&gt; Umar Hayat<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Thu, Feb 13, 2020 at 3:43 AM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; &gt; I just followed the description pattern used for other ssl variables. We<br>
&gt;&gt;&gt;&gt;&gt; &gt; can use PostgreSQL doc if we remove following two line from that:<br>
&gt;&gt;&gt;&gt;&gt; &gt; &quot;Relative paths are relative to the data<br>
&gt;&gt;&gt;&gt;&gt; &gt; directory. This parameter can only be set in the postgresql.conf file<br>
&gt;&gt;&gt;&gt;&gt; &gt; or on the server command line.<br>
&gt;&gt;&gt;&gt;&gt; &gt; &quot;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Sounds good to me.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; &gt; - It would be nice to include regression test patch. See<br>
&gt;&gt;&gt;&gt;&gt; &gt;&gt;   src/test/023.ssl_connection for an example.<br>
&gt;&gt;&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt;&gt;&gt; &gt; Sure, I will create and send test patch in src/test/023.ssl_connection.<br>
&gt;&gt;&gt;&gt;&gt; &gt; I will try to generate CRL file for existing certification file in this<br>
&gt;&gt;&gt;&gt;&gt; &gt; this test. If thats not possible, then I have to generate new<br>
&gt;&gt;&gt;&gt;&gt; certification<br>
&gt;&gt;&gt;&gt;&gt; &gt; and CRL file.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thank you. Looking forward to the new patch.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Best regards,<br>
&gt;&gt;&gt;&gt;&gt; --<br>
&gt;&gt;&gt;&gt;&gt; Tatsuo Ishii<br>
&gt;&gt;&gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt;&gt;&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt;&gt;&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; pgpool-hackers mailing list<br>
&gt;&gt; <a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div>