Re: sslinfo extension - add notbefore and notafter timestamps

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: sslinfo extension - add notbefore and notafter timestamps
Дата
Msg-id 60F62500-0225-4CC2-8233-1C4700452128@yesql.se
обсуждение исходный текст
Ответ на Re: sslinfo extension - add notbefore and notafter timestamps  (Jacob Champion <jacob.champion@enterprisedb.com>)
Ответы Re: sslinfo extension - add notbefore and notafter timestamps  (Jacob Champion <jacob.champion@enterprisedb.com>)
Список pgsql-hackers
> On 20 Mar 2024, at 15:28, Jacob Champion <jacob.champion@enterprisedb.com> wrote:

>> +   result -= ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * USECS_PER_DAY);
>> +   return TimestampTzGetDatum(result);
>
> Is that final bare subtraction able to wrap around for dates far in the past?

We are subtracting 30 years from a calculation that we know didnt overflow, so
I guess if the certificate notBefore (the notAfter cannot be that early since
we wouldn't be able to connect with it) was set to early enough?  It didn't
strike me as anything above academical unless I'm thinking wrong here.

--
Daniel Gustafsson




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: documentation structure
Следующее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: Possibility to disable `ALTER SYSTEM`