Re: sslinfo extension - add notbefore and notafter timestamps

From: Cary Huang <cary(dot)huang(at)highgo(dot)ca>
To: "Daniel Gustafsson" <daniel(at)yesql(dot)se>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sslinfo extension - add notbefore and notafter timestamps
Date: 2023-07-17 18:26:40
Message-ID: 189651ac531.121770805396824.7203598683046078451@highgo.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

> > Perhaps calling "tm2timestamp(&pgtm_time, 0, NULL, &ts)" without checking the return code would be just fine. I see some other usages of tm2timstamp() in other code areas also skip checking the return code.
>
> I think we want to know about any failures, btu we can probably make it into an
> elog() instead, as it should never fail.

Yes, sure. I have corrected the error message to elog(ERROR, "timestamp out of range") on a rare tm2timestamp() failure. Please see the attached patch based on your v5. "v6-0001-Set-fixed-dates-for-test-certificates-validity.patch" is exactly the same as "v5-0001-Set-fixed-dates-for-test-certificates-validity.patch", I just up the version to be consistent.

thank you very much

Cary Huang
-------------
HighGo Software Inc. (Canada)
cary(dot)huang(at)highgo(dot)ca
www.highgo.ca

Attachment Content-Type Size
v6-0001-Set-fixed-dates-for-test-certificates-validity.patch application/octet-stream 87.8 KB
v6-0002-Add-notBefore-and-notAfter-to-SSL-cert-info-displ.patch application/octet-stream 23.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2023-07-17 18:47:12 Re: Should we remove db_user_namespace?
Previous Message Nathan Bossart 2023-07-17 17:58:13 Re: Fix search_path for all maintenance commands