ProxySG对ECDHE协议的支持

背景说明

  ECDHE是一种相对比较新型的SSL密钥交换协议,现在越来越多的站点都在采用这种密钥交换协议,它相比RSA的好处是使用较小的加密位数(256)就能达到与RSA高等级加密位数(2048)同样的安全等级,加快了加解密的速度。

遇到的问题

  如果在某些版本的ProxySG上开启HTTPS解密功能或者Detect Protocol功能,在正向代理的环境下有可能会遇到某些HTTPS站点打不开的情况

问题解析

  其实大部分访问HTTPS站点遇到问题的原因都是由于ProxySG之前的一些版本不支持ECDHE这种密钥交换协议而导致的,如下图这组抓包所示,52.77.19.103是HTTPS站点,另外一个IP是代理服务器的地址,Wireshark已经解析出了通讯中断的原因是Handshake Failure
HTTPS交互错误

  ProxySG在SGOS 6.5.5.X之前的版本都不认识ECDHE这个协议,所以没办法代理,才会造成问题,但这不是本文想说的重点,协议不支持,升级版本就可以了,建议升级到SGOS 6.5.7.7及以后的版本。但本文想说的重点是:

为何仅开启Detect Protocol也会受影响

  如果我们在ProxySG上没有设定解密策略,仅仅勾选了代理服务中的Detect Protocol,发现也会受影响,这是什么道理?
  这个问题同样困扰了很多ProxySG使用者,以下是BlueCoat官方论坛上的厂商人员对Detect Protocol在开启和关闭两种状态下的详细解释:

  the difference is that when disabling protocol detection the SSL Proxy will not get to see the traffic and the HTTP Proxy handles the SSL connection just as plain TCP because it would neither recognize nor know how to treat SSL traffic.
  When protocol detection is enabled the SSL Proxy gets the traffic and will have a look at the SSL Negotiation to verify certificates, check ciphers etc. It will still not decrypt anything. Only when you tell it to do an SSL Intercept it will actually decrypt the SSL connection.
  The User-Agent appearing on the server side will always be the one of the client (unless you rewrite it). By default the SG just copies it from the client connection.

  上面这些话已经把问题解释的很详细了,其中加粗的那句话就是开启Detect Protocol也会受影响的原因。
  所以,解决这个问题的方法应该是在CPL中写脚本针对某个打不开的HTTPS站点关闭Detect Protocol功能,或全局关闭此功能

<Proxy>
url.domain="www.xxxx.com" detect_protocol(none)

另外的一些注意

  在SGOS 6.5.5.X到SGOS 6.5.7.7之间的版本也支持ECDHE,但并不是默认支持的,需要命令行下开启,但由于支持的不好,开启后可能会导致CPU飙升,需要谨慎,建议还是直接升到合适版本

#(config) ssl
#(config ssl) proxy dhe-ciphers enable
验证配置
#(config) show ssl proxy

猜你喜欢

转载自blog.csdn.net/mingrui_89/article/details/78181246
今日推荐