Hello,
Please add a function to load dynamically more than one certificate for multi domain server.
tlsConfig := &tls.Config{
PreferServerCipherSuites: true,
MinVersion: tls.VersionTLS13,
ClientCAs: caCertPool,
GetClientCertificates: certR.GetCertificatesFunc(), // more than one
//ClientAuth: tls.RequireAndVerifyClientCert,
}
func (cr *certReloader) GetCertificatesFunc() func(*tls.ClientHelloInfo) ([]*tls.Certificate, error) {
return func(chi *tls.ClientHelloInfo) ([]*tls.Certificate, error) {
cr.m.RLock()
defer cr.m.RUnlock()
return cr.certs, nil
}
}
Hello,
Please add a function to load dynamically more than one certificate for multi domain server.