【问题标题】:golang tls.Config CiperSuites doesn't restrict client authgolang tls.Config CiperSuites 不限制客户端身份验证
【发布时间】:2016-08-28 21:53:32
【问题描述】:

我的 tls.Config 设置为不使用 ECDHE 交换,因此我可以在无需获取客户端密钥的情况下监控我在 wireshark 中的流量。

 config = &tls.Config{
     Certificates:             []tls.Certificate{cpair},
     MinVersion:               tls.VersionTLS12,
     PreferServerCipherSuites: true,
     ClientAuth: tls.NoClientCert,
     CipherSuites: []uint16{tls.TLS_RSA_WITH_AES_256_CBC_SHA,
         tls.TLS_RSA_WITH_RC4_128_SHA,
         tls.TLS_RSA_WITH_AES_128_CBC_SHA,
     },
 }

但是,在分析wireshark 中的流量时,我仍然看到正在使用 ECDHE ciper suiete 建立连接:

 62 ssl_decrypt_pre_master_secret: session uses Diffie-Hellman key exchange 
 (cipher suite 0xC014 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) 
 and cannot be decrypted using a RSA private key file.

【问题讨论】:

    标签: ssl encryption go tcp


    【解决方案1】:

    原来我忘记了我在 apache 上的反向代理。

    wireshark 正在端口 443 上寻找 https 连接,

    但是在服务器端口上过滤掉了apache和我的服务器之间的通信

    我能够在 apache 的配置中成功限制 ssl.conf 上的 SSLCipherSuites 并能够分析流量

    我假设 apache 在反向代理中将数据传递给我的 go 程序,这导致 apache 和 go 协商基于 tls.Config 的连接,我没有看到,因为该通信是在不同的localhost 上的端口(我是根据我的 IP 地址上的端口 443 过滤wireshark,而不是 localhost,这是 apache 和 go 的通信方式)

    【讨论】:

      猜你喜欢
      • 2016-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-23
      • 2011-04-09
      • 2013-10-07
      • 2013-07-20
      • 2011-08-17
      相关资源
      最近更新 更多