-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whether can dynamically set the certificate? #1506
Comments
Hello @basicfu, Please take a look at: #1486 and 481#issuecomment-605621255 |
@kataras He was configured before running,I hope can be in the running configuration can |
Oh I see, this is covered in his answer. The app.Run(iris.TLS(":443", "", "", func(su *iris.Supervisor) {
su.Server.TLSConfig = &tls.Config{
MinVersion: tls.VersionTLS10,
GetCertificate: func(hello *tls.ClientHelloInfo) (*tls.Certificate, error){
/* ur implementation here */
}}
})) |
You may understand the wrong,I use scenes from redis subscribe to the domain name certificate,After the service,Update the certificate information from asynchronous thread.
|
OK @basicfu, I don't get it, why EDIT: I am going to rest for a bit because I am asleep, take your time to answer. |
I'm sorry,I use the following code can be used
But he only gets the certificate when the new SSL handshakes. If the user has established an SSL connection with a domain name and it is not closed. I updated the SSL certificate on the server side, but the connection is still the old certificate.I hope I can refresh the certificate in real time. I don't know if it can be realized through iris. My English is translated. Sorry |
Again, post the code you used before Iris. Iris is fully compatible with net/http. If it cant be done with Iris, it cant be done in general. |
Thank you for |
Hello @basicfu, you are welcome but you didn't post any code in order to help you, no problem. Could you please post down your solution so other developers can learn from? |
@kataras I found a document in Aliyun dycert.lua 是阿里云 CDN 实现的动态证书模块,在 SSL 完整握手时会调用到这个模块,在 Session 复用的握手情况下不会调用到这个模块,这是因为 Session 复用时不需要证书和私钥,这是 openssl 回调接口的官方实现,但是阿里云 CDN 的实现中,还有很多 HTTPS 的动态配置需要在 dycert 模块中来设置,所以我们修改了 openssl,让其在 Session 复用时也调用到 dycert 模块,这为我们实现很多 HTTPS 动态配置(比如: HTTP/2 开关,客户端认证,TLS record size 配置)提供了方便 |
I have been to see the AutoTLS function,But this is automatically applied to letsencrypt for certificate,I can dynamically at runtime to provide certificates of these domain names?
example:
If not I can only through the nginx lua dynamic allocation certificate
The text was updated successfully, but these errors were encountered: