You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tls.config provides several callback functions such as GetCertificate, GetClientCertificate, and GetConfigForClient, which enable dynamic behavior during the TLS handshake. These callbacks are particularly useful for scenarios involving certificate rotation, both on the client and server sides.
However, tls.Config currently lacks an option for dynamically managing the Root CAs used to verify server certificates on the client side. Since x509.CertPool methods cannot be invoked concurrently by multiple goroutines, it becomes challenging to update or reload the Root CA pool at runtime without risking data races or inconsistent state.
Motivation:
Root CA Certificate rotation
Dynamic trust policies
This proposal seeks to introduce a new callback in tls.Config that allows for dynamically retrieving the latest CertPool, similar to the existing callback functions.
// GetRootCAs returns the set of root certificate authorities// that clients use when verifying server certificates.// // If GetRootCAs is nil, then the RootCAs is used. GetRootCAsfunc() (*x509.CertPool)
The client handshake will work with the proposed changes as follows:
Proposal Details
The tls.config provides several callback functions such as GetCertificate, GetClientCertificate, and GetConfigForClient, which enable dynamic behavior during the TLS handshake. These callbacks are particularly useful for scenarios involving certificate rotation, both on the client and server sides.
However, tls.Config currently lacks an option for dynamically managing the Root CAs used to verify server certificates on the client side. Since x509.CertPool methods cannot be invoked concurrently by multiple goroutines, it becomes challenging to update or reload the Root CA pool at runtime without risking data races or inconsistent state.
Motivation:
This proposal seeks to introduce a new callback in tls.Config that allows for dynamically retrieving the latest CertPool, similar to the existing callback functions.
The client handshake will work with the proposed changes as follows:
The text was updated successfully, but these errors were encountered: