Repository navigation
Commit e7bc0a9
doc: document invalid X509Certificate validity times
When a certificate's notBefore or notAfter time cannot be parsed,
validFrom and validTo return the string 'Bad time value', and
validFromDate and validToDate return an invalid Date. Relational
comparisons with an invalid Date are always false, so a naive expiry
check can treat such a certificate as valid. Document the current
behavior and tell callers to reject invalid dates first.
Signed-off-by: Sarthak Ahuja <39986642+SarthakAhuja@users.noreply.github.com>
PR-URL: #67406
Refs: #67285
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>1 parent c5d31ac commit e7bc0a9
1 file changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3499 | 3499 | | |
3500 | 3500 | | |
3501 | 3501 | | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
3502 | 3505 | | |
3503 | 3506 | | |
3504 | 3507 | | |
| |||
3511 | 3514 | | |
3512 | 3515 | | |
3513 | 3516 | | |
| 3517 | + | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
3514 | 3527 | | |
3515 | 3528 | | |
3516 | 3529 | | |
| |||
3521 | 3534 | | |
3522 | 3535 | | |
3523 | 3536 | | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
3524 | 3540 | | |
3525 | 3541 | | |
3526 | 3542 | | |
| |||
3533 | 3549 | | |
3534 | 3550 | | |
3535 | 3551 | | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
3536 | 3562 | | |
3537 | 3563 | | |
3538 | 3564 | | |
| |||
0 commit comments