mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-18 01:58:09 -05:00
BUG/MEDIUM: ssl: fix OCSP expiry calculation
The hour part of the timezone offset was multiplied by 60 instead of
3600, resulting in an inaccurate expiry. This bug was introduced in
1.6-dev1 by commit 4f3c87a ("BUG/MEDIUM: ssl: Fix to not serve expired
OCSP responses."), so this fix must be backported into 1.7 and 1.6.
This commit is contained in:
parent
64cc49cf7e
commit
953917abc9
1 changed files with 2 additions and 2 deletions
|
|
@ -546,12 +546,12 @@ nosec:
|
|||
else if (p[0] == '+') {
|
||||
if (end - p != 5) return -1;
|
||||
/* Apply timezone offset */
|
||||
return epoch - ((10 * (p[1] - '0') + p[2] - '0') * 60 + (10 * (p[3] - '0') + p[4] - '0')) * 60;
|
||||
return epoch - ((10 * (p[1] - '0') + p[2] - '0') * 60 * 60 + (10 * (p[3] - '0') + p[4] - '0')) * 60;
|
||||
}
|
||||
else if (p[0] == '-') {
|
||||
if (end - p != 5) return -1;
|
||||
/* Apply timezone offset */
|
||||
return epoch + ((10 * (p[1] - '0') + p[2] - '0') * 60 + (10 * (p[3] - '0') + p[4] - '0')) * 60;
|
||||
return epoch + ((10 * (p[1] - '0') + p[2] - '0') * 60 * 60 + (10 * (p[3] - '0') + p[4] - '0')) * 60;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue