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 1lCZyi-0005Kd-MB for pgsql-odbc@arkaria.postgresql.org; Thu, 18 Feb 2021 03:27:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCZyh-0007Tq-EA for pgsql-odbc@arkaria.postgresql.org; Thu, 18 Feb 2021 03:27:43 +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 1lCZyh-0007Tj-6D for pgsql-odbc@lists.postgresql.org; Thu, 18 Feb 2021 03:27:43 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lCZye-0003Ag-Ea for pgsql-odbc@postgresql.org; Thu, 18 Feb 2021 03:27:42 +0000 Received: by mail-lj1-x22d.google.com with SMTP id r23so1154053ljh.1 for ; Wed, 17 Feb 2021 19:27:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8vUqlCnAxcUlad9lo4N9v02HAwFaULWhUTWgyYaYlqk=; b=sHSRhjVLdFQApcxRMY773EEtywCNgWjRUX+TPgMTllywSxdEB3QfFagO1yRkvq/g0J es0k0QG8gJoSW+MNjP+dvIEnDOp3KUTJBgQYAnLiMJ2fbgiwo+hhcYl1rTlEDyWstaHF nOdz9Pi/DLojXIygRPEB5htq5gEX41GXk0AJSbQdU3p3eO+rPtpl7JRuDs/kHr3uH2wK d7zZOTdhs0gQFs4ibc1G76VEMK20KODU3OP4DyG17D1M4/2aiZqtJG7AtUMhyvzO/5c+ F4f6YN0/fjLwuVIGuiJyDFjbCk1DYAqi66aYo9nDc3xDP5B++n1PBwXdtigrAI+BJTBd Rfag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8vUqlCnAxcUlad9lo4N9v02HAwFaULWhUTWgyYaYlqk=; b=TeZidsrR63rZxAJ1fwhpyHioKlFFVSXhwLAIKFEf+AmeXGzPAj/vs6U/QDWeI1yaqN 6jFmWVBdgrQoyhVlK5/YMLqaUZECI7bOy4ufUD5zzzF6L9qWalFHYTgWuKqA2B1nHJAT wSIjiTDZwAtuAXV6cb5Xq2BSOSMLYGHODN7SwtLLZskeeXYFF13uHFaJ6pL3m6lsqYJB iZur46v6CsdLgtqPwp5ehwhlHL/X/PkmCQ1ft8ezt5dBrjR0jBSNn9yT3nUdYP7Ti9ut cH/cYA1VuFBZqh1Sugo/TxuKuJM+SeGkR+FSrLox1cyUO2VCZ+uAkkwXfDjRtY3+SVnZ 0qxQ== X-Gm-Message-State: AOAM532xY9a6HuQi5EHccC1V5c2A1cpsROksO6AH+Hjun5XFxYhUI8rk /MmnWp0TnzLweChD9YDd6V6Ss+4V+pMyIQTPYLo= X-Google-Smtp-Source: ABdhPJxrxX+91LrqoG9UEUzuQLf0c1uwnh4X2Whw4lhQo0MI/B9Q+oFBzl6vZ8H4I0BEnDs77KW0bTnvcNZjt4achiI= X-Received: by 2002:a2e:858f:: with SMTP id b15mr1376609lji.316.1613618857952; Wed, 17 Feb 2021 19:27:37 -0800 (PST) MIME-Version: 1.0 References: <0A5ECAFA-DDF5-4B82-9A90-83F948EADC80@yesql.se> In-Reply-To: <0A5ECAFA-DDF5-4B82-9A90-83F948EADC80@yesql.se> From: =?UTF-8?B?5LqV5LiK5Y2a5Y+y?= Date: Thu, 18 Feb 2021 12:27:26 +0900 Message-ID: Subject: Re: SSL connection check To: daniel@yesql.se Cc: "pgsql-odbc@postgresql.org" Content-Type: multipart/alternative; boundary="000000000000d4c93205bb93eaed" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000d4c93205bb93eaed Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Daniel, I would take care of the patch. Thanks. Hiroshi Inoue =E3=82=A6=E3=82=A4=E3=83=AB=E3=82=B9 =E3=83=95=E3=83=AA=E3=83=BC=EF=BD=A1 www.avg.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> 2021=E5=B9=B42=E6=9C=8817=E6=97=A5(=E6=B0=B4) 19:38 Daniel Gustafsson : > PgDtc_is_recovery_available use PQgetssl() to check if SSL was used for t= he > connection. PQgetssl() is discouraged since it is hardcoded to the OpenS= SL > implementation and may fail to identify an SSL connection in case another > TLS > backend is added to postgres (a few alternatives have already been > discussed on > -hackers). > > The attached changes to use PQsslInUse() to perform the check, and remove= s > a > comment which seemed out of place with this (unless I totally misundersto= od > it). PQsslInUse has been available since 9.5, to cope with older libpq > versions, an autoconf check is added for falling back on PQgetssl in 9.4 > through to 9.2. > > -- > Daniel Gustafsson https://vmware.com/ > > --000000000000d4c93205bb93eaed Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Daniel,

I would take care of the pat= ch.

Thanks.
Hiroshi Inoue

=3D""<= /td> =E3=82=A6=E3=82=A4= =E3=83=AB=E3=82=B9 =E3=83=95=E3=83=AA=E3=83=BC=EF=BD=A1 www.avg.com
=
2021=E5=B9=B42=E6=9C=8817=E6=97=A5(=E6=B0=B4) 19:38 Daniel Gustafsson &= lt;daniel@yesql.se>:
PgDtc_is_recovery_available = use PQgetssl() to check if SSL was used for the
connection.=C2=A0 PQgetssl() is discouraged since it is hardcoded to the Op= enSSL
implementation and may fail to identify an SSL connection in case another T= LS
backend is added to postgres (a few alternatives have already been discusse= d on
-hackers).

The attached changes to use PQsslInUse() to perform the check, and removes = a
comment which seemed out of place with this (unless I totally misunderstood=
it).=C2=A0 PQsslInUse has been available since 9.5, to cope with older libp= q
versions, an autoconf check is added for falling back on PQgetssl in 9.4 through to 9.2.

--
Daniel Gustafsson=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0https://v= mware.com/

--000000000000d4c93205bb93eaed--