Bug #9899
PHP Error: DateTime::diff() expects parameter 1 to be DateTimeInterface, bool given in /etc/inc/certs.inc on line 1958
100%
Description
Hi.
In latest snapshot there is:
Crash report begins. Anonymous machine information:
amd64
12.0-RELEASE-p10
FreeBSD 12.0-RELEASE-p10 fe839027797(RELENG_2_5) pfSense
Crash report details:
PHP Errors:
[15-Nov-2019 03:01:00 Europe/Berlin] PHP Warning: DateTime::diff() expects parameter 1 to be DateTimeInterface, bool given in /etc/inc/certs.inc on line 1958
[15-Nov-2019 03:01:00 Europe/Berlin] PHP Warning: DateTime::diff() expects parameter 1 to be DateTimeInterface, bool given in /etc/inc/certs.inc on line 1958
No FreeBSD crash data found.
Associated revisions
History
#1
Updated by Jim Pingle over 1 year ago
- Subject changed from PHP error to PHP Error: DateTime::diff() expects parameter 1 to be DateTimeInterface, bool given in /etc/inc/certs.inc on line 1958
- Category set to Certificates
- Assignee set to Jim Pingle
Do you have a CA or certificate in your list which has a missing end date?
If so, do you mind sharing the contents of that certificate? Assuming it does not have any sensitive information in the fields. I would only need to see the certificate itself, not the private key.
#2
Updated by Jim Pingle over 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 1120b85cb2a275de3ffe337c4c3ac781c2ccfb9e.
#3
Updated by Greg M over 1 year ago
Hi.
Confirmed fixed.
Cert expired and it had end date.
#4
Updated by Jim Pingle over 1 year ago
- Status changed from Feedback to Resolved
OK, thanks for testing!
#5
Updated by Jim Pingle 5 months ago
- Target version set to 2.5.0
Certificate date calculation changes. Fixes #9899
Make the certificate date calculation more general and also try multiple ways
to determine the date (both timestamp and unix timestamp).
Catch cases where one or the other date fails to calculate to avoid errors.
While here, also account for the fact that DateTime::diff result is always
positive, when we need to know if it's negative.