简体   繁体   English

如果多个不同的接受套接字使用相同的OpenSSL上下文是否有问题?

[英]Is it a problem if multiple different accepting sockets use the same OpenSSL context?

Is it OK if the same OpenSSL context is used by several different accepting sockets? 如果几个不同的接受套接字使用相同的OpenSSL上下文,可以吗?

In particular I'm using the same boost::asio::ssl::context with 2 different listening sockets. 特别是我使用了带有2个不同监听套接字的相同boost :: asio :: ssl :: context。

Yep, SSL_CTX--which I believe is the underlying data structure--is just a global data structure used by your program. 是的,SSL_CTX(我认为是底层数据结构)只是程序使用的全局数据结构。 From ssl(3): 从ssl(3):

SSL_CTX (SSL Context) SSL_CTX(SSL上下文)

That's the global context structure which is created by a server or client once per program life-time and which holds mainly default values for the SSL structures which are later created for the connections. 这是服务器或客户端在每个程序生命周期中一次创建的全局上下文结构,它主要包含SSL结构的默认值,这些默认值随后将为连接创建。

It should be OK. 应该没关系

For example a typical RFC4217 FTPS server will use the same SSL context for the control socket and all data sockets within that session. 例如,典型的RFC4217 FTPS服务器将对会话中的控制套接字和所有数据套接字使用相同的SSL上下文。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM