Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4i1a-0000YN-H8 for pgsql-admin@arkaria.postgresql.org; Thu, 01 Jun 2023 13:07:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q4i1Y-0007S4-L3 for pgsql-admin@arkaria.postgresql.org; Thu, 01 Jun 2023 13:07:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q4i1Y-0007Ru-6X for pgsql-admin@lists.postgresql.org; Thu, 01 Jun 2023 13:07:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q4i1Q-0034qJ-RM for pgsql-admin@lists.postgresql.org; Thu, 01 Jun 2023 13:07:26 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 351D7ITP3185944; Thu, 1 Jun 2023 09:07:18 -0400 From: Tom Lane To: Nikhil Shetty cc: Pgsql-admin Subject: Re: Question on SSL certificate expiry In-reply-to: References: Comments: In-reply-to Nikhil Shetty message dated "Thu, 01 Jun 2023 17:10:22 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3779.1685624838.1@sss.pgh.pa.us> Date: Thu, 01 Jun 2023 09:07:18 -0400 Message-ID: <3780.1685624838@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nikhil Shetty writes: > We were using MTLS to connect to the database. We noticed that even after > server certificates expired the client was able to connect to the database. > 1. Doesn't postgres check the expiry date of the certificate? Postgres does not. The openssl library can. The most likely guess, on the basis of the next-to-zero details you provided, is that the connection is succeeding via some method that doesn't require the client to check the server's certificate --- for instance, a completely unencrypted connection. regards, tom lane