mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-11 08:08:06 -05:00
Use correct date in cert check error.
When a host certificate was used outside its valid date range, we were displaying the current time where we meant to show the relevant bound of the validity range. (cherry picked from commit 68db3d195d00e3f3904a7e004a4efd00fd303efb)
This commit is contained in:
parent
4d888d1ff4
commit
b760a2a040
@ -1033,12 +1033,14 @@ static bool opensshcert_check_cert(
|
||||
*/
|
||||
if (time < ck->valid_after) {
|
||||
put_fmt(error, "Certificate is not valid until ");
|
||||
opensshcert_time_to_iso8601(BinarySink_UPCAST(error), time);
|
||||
opensshcert_time_to_iso8601(BinarySink_UPCAST(error),
|
||||
ck->valid_after);
|
||||
goto out;
|
||||
}
|
||||
if (time >= ck->valid_before) {
|
||||
put_fmt(error, "Certificate expired at ");
|
||||
opensshcert_time_to_iso8601(BinarySink_UPCAST(error), time);
|
||||
opensshcert_time_to_iso8601(BinarySink_UPCAST(error),
|
||||
ck->valid_before);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user