从 php curl https 请求中删除 SCSV 密码套件



在Ubuntu服务器中使用php-curl发出HTTPS请求时,我发现它增加了一个额外的密码套件,标识为"EMPTY-RENEGOTIATION-INFO-SCSV"。我知道这是一个假的密码套件,但是,我想从https请求中删除此密码套件。是否有任何 curlopt 参数或 openssl 扩展或 apache 配置文件可用于阻止此默认行为。谢谢

此"密码"记录在 RFC 5746 第 3.3 节中。这是一种应对 CVE-2009-3555 和其他地方所述的前缀攻击的方法。

This SCSV is not a true cipher suite (it does not correspond to any
valid set of algorithms) and cannot be negotiated. Instead, it has
the same semantics as an empty "renegotiation_info" extension, as
described in the following sections. Because SSLv3 and TLS
implementations reliably ignore unknown cipher suites, the SCSV may
be safely sent to any server.

因此,您不会使用 curl 提供的常规密码套件选项 (CURLOPT_SSL_CIPHER_LIST) 禁用/启用此功能,而是需要要求 TLS 库允许不安全的重新协商。

我不认为 PHP 允许你这样做,libcurl 也没有提供它的选项,所以我相信你必须修补 C 源代码才能实现它。

OpenSSL的SSL_CTX_set_options()文档中也对此进行了进一步描述。

最新更新