aboutsummaryrefslogtreecommitdiff
path: root/lib/std/http
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-12-22 19:56:43 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-01-02 16:57:15 -0700
commit7cb535d4b54a4e5627edc6b558d1f31b41651328 (patch)
tree98dbf7e28271b958ab12593fa3fff2fa3da0c56c /lib/std/http
parent862ecf23442b7b399f07400c8997c6481f329853 (diff)
downloadzig-7cb535d4b54a4e5627edc6b558d1f31b41651328.tar.gz
zig-7cb535d4b54a4e5627edc6b558d1f31b41651328.zip
std.crypto.tls.Certificate: verify time validity
When scanning the file system for root certificates, expired certificates are skipped and therefore not used for verification in TLS sessions. There is only this one check, however, so a long-running server will need to periodically rescan for a new Certificate.Bundle and strategically start using it for new sessions. In this commit I made the judgement call that applications would like to opt-in to root certificate rescanning at a point in time that makes sense for that application, as opposed to having the system clock potentially start causing connections to fail. Certificate verification checks the subject only, as opposed to both the subject and the issuer. The idea is that the trust chain analysis will always check the subject, leading to every certificate in the chain's validity being checked exactly once, with the root certificate's validity checked upon scanning. Furthermore, this commit adjusts the scanning logic to fully parse certificates, even though only the subject is technically needed. This allows relying on parsing to succeed later on.
Diffstat (limited to 'lib/std/http')
0 files changed, 0 insertions, 0 deletions