-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
tls.Config
provides a GetCertificate
function for providing TLS certificates dynamically. I suggest to add a GetClientCAs
function to provide the same for the ClientCAs
field.
Rationale: On a server the ClientCAs
field is used for client certificate authentication but to my knowledge it isn't possible to extend the list of client certificates at runtime without interruption of existing connections (restart service or listener) since x509.CertPool
is a struct and not safe for use by multiple go routines. A GetClientCAs
function would also mirror the GetCertificate
function.
I have written a reverse proxy http://github.com/eBay/fabio for which I've added the dynamic reloading of TLS certificates without restart and would like to provide the same functionality for the client cert authentication.
I'm willing to write the change if this is something that could be accepted. Target would be Go 1.8 obviously.