gpt4 book ai didi

sockets - 在客户端仅发送其证书(单向身份验证)的 SSL 握手中是否可能。服务器不需要发送任何证书吗?

转载 作者:可可西里 更新时间:2023-11-01 02:33:54 26 4
gpt4 key购买 nike

在客户端仅发送其证书的 SSL/TLS 握手中是否可能。服务器不需要发送任何证书吗?截至目前,只有一种握手方式是服务器将其证书发送给客户端。据我所知,在这种情况下,服务器需要维护所有客户端根证书(如果不同)。这是不切实际的。如果可能的话,安全问题是什么。

这是在 C# 或 C++ 中使用 SSL 进行套接字编程的上下文感谢帮助!

最佳答案

是的,可以在没有服务器证书的情况下使用 SSL/TLS。参见 https://security.stackexchange.com/questions/38589/can-https-server-configured-without-a-server-certificate

您需要至少支持一种匿名密码套件的软件 SSL/TLS supports ,例如 TLS_DH_anon_WITH_AES_128_CBC_SHA256。每the OpenSSL Diffie Hellman wiki entry :

Anonymous Diffie-Hellman uses Diffie-Hellman, but without authentication. Because the keys used in the exchange are not authenticated, the protocol is susceptible to Man-in-the-Middle attacks. Note: if you use this scheme, a call to SSL_get_peer_certificate will return NULL because you have selected an anonymous protocol. This is the only time SSL_get_peer_certificate is allowed to return NULL under normal circumstances.

You should not use Anonymous Diffie-Hellman. You can prohibit its use in your code by using "!ADH" in your call to SSL_set_cipher_list.

请注意,在大多数可用的 SSL/TLS 软件中,对此类密码套件和配置的支持要么不存在,要么非常有限,因为此类配置容易受到中间人攻击——这正是 SSL/TLS 用于防止。例如,您必须编译自己的 OpenSSL 代码。

除非您控制通信 channel 两端的软件,否则无法有效地实现此类系统。

而且没有真正的理由实现这样的系统,因为它根本不安全。

但是您可以付出很多努力来做到这一点。

关于sockets - 在客户端仅发送其证书(单向身份验证)的 SSL 握手中是否可能。服务器不需要发送任何证书吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50563329/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com