like Go:
func main() {
ln, _ := net.Listen("tcp",":443")
ln = tls.NewListener(ln, &tls.Config{
GetCertificate: func (info *clientHelloInfo) (Certificate, error) {
// from db or dynamic generate a certificate use "info.ServerName"
cert := generateX509Certificate(info.ServerName)
return cert, nil
}
})
}
In Go I can implement that the first time a domain is accessed (or even a concurrent request) only one goroutine is responsible for generating the certificate, and then when that is done, all connections are immediately successful.
No idea. Since Spring is called through Netty, but don't know how to modify the Netty behavior of Spring.