我有以下来源使用 TLS/SSL 协议连接 websocket 服务器:
struct sessionTLS {
int sid;
SSL_CTX *ctx;
SSL *ssl;
};
sessionTLS tls ;
tls.ctx = SSL_CTX_new(TLS_client_method());
根据 libressl 手册:https ://man.openbsd.org/SSL_CTX_new.3
TLS_method(), TLS_server_method(), TLS_client_method()
These are the general-purpose version-flexible SSL/TLS methods.
The actual protocol version used will be negotiated to the highest version
mutually supported by the client and the server. The supported protocols are
TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3. Applications should use these methods
and avoid the version-specific methods described below.
然后我想知道如何知道实际的协议是?!在服务器和客户端之间完成协商后,应该有一些消息显示 SSLV3 是协议,TLSV1 是协议,或者其他。
我是 TLS/SSL 的新手,非常感谢任何建议和信息。