<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>《Go和HTTPS》的评论</title>
	<atom:link href="http://tonybai.com/2015/04/30/go-and-https/feed/" rel="self" type="application/rss+xml" />
	<link>https://tonybai.com/2015/04/30/go-and-https/</link>
	<description>一个程序员的心路历程</description>
	<lastBuildDate>Wed, 25 Mar 2026 09:21:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7657</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Thu, 01 Dec 2022 13:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7657</guid>
		<description>抓https的原理是利用“中间人”攻击吧。即将抓包工具的ca.crt手工加入到浏览器端，这样浏览器就可以通过该ca.crt对“抓包工具”冒充的“中间人”予以信任。从而与抓包工具建立连接，抓包工具再与真正的服务端建连，并转发浏览器客户端的请求，转发服务端应答给浏览器，这期间抓包工具拥有两段的对称密钥，可以看到所有通信数据的明文。</description>
		<content:encoded><![CDATA[<p>抓https的原理是利用“中间人”攻击吧。即将抓包工具的ca.crt手工加入到浏览器端，这样浏览器就可以通过该ca.crt对“抓包工具”冒充的“中间人”予以信任。从而与抓包工具建立连接，抓包工具再与真正的服务端建连，并转发浏览器客户端的请求，转发服务端应答给浏览器，这期间抓包工具拥有两段的对称密钥，可以看到所有通信数据的明文。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：iahob</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7656</link>
		<dc:creator>iahob</dc:creator>
		<pubDate>Thu, 01 Dec 2022 07:05:16 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7656</guid>
		<description>我有个疑问就是，现在很多抓包软件支持https 抓包，但是要安装证书，这个证书是不是就是上面生成的ca.crt , 当抓包软件抓不同的域名的https ，会生成不通域名的证书，这个过程是这样的吗？</description>
		<content:encoded><![CDATA[<p>我有个疑问就是，现在很多抓包软件支持https 抓包，但是要安装证书，这个证书是不是就是上面生成的ca.crt , 当抓包软件抓不同的域名的https ，会生成不通域名的证书，这个过程是这样的吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7615</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Fri, 15 Apr 2022 23:02:42 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7615</guid>
		<description>嗯，找到原因就好。</description>
		<content:encoded><![CDATA[<p>嗯，找到原因就好。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：fli123443</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7614</link>
		<dc:creator>fli123443</dc:creator>
		<pubDate>Thu, 14 Apr 2022 13:41:40 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7614</guid>
		<description>应该是我的问题，我把wireshark抓的包导出看到证书是对的，后来发现是服务端的问题</description>
		<content:encoded><![CDATA[<p>应该是我的问题，我把wireshark抓的包导出看到证书是对的，后来发现是服务端的问题</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：fli123443</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7613</link>
		<dc:creator>fli123443</dc:creator>
		<pubDate>Thu, 14 Apr 2022 13:28:11 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7613</guid>
		<description>实测用wireshark抓包确实 客户端发送的证书Certificates 没有内容</description>
		<content:encoded><![CDATA[<p>实测用wireshark抓包确实 客户端发送的证书Certificates 没有内容</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7612</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Wed, 13 Apr 2022 22:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7612</guid>
		<description>Certificates注释如下：   

 // Certificates contains one or more certificate chains to present to the
    // other side of the connection. The first certificate compatible with the
    // peer&#039;s requirements is selected automatically.
    //
    // Server configurations must set one of Certificates, GetCertificate or
    // GetConfigForClient. Clients doing client-authentication may set either
    // Certificates or GetClientCertificate.
    //
    // Note: if there are multiple Certificates, and they don&#039;t have the
    // optional field Leaf set, certificate selection will incur a significant
    // per-handshake performance cost.
    Certificates []Certificate

这个字段应该是有效的。</description>
		<content:encoded><![CDATA[<p>Certificates注释如下：   </p>
<p> // Certificates contains one or more certificate chains to present to the<br />
    // other side of the connection. The first certificate compatible with the<br />
    // peer&#8217;s requirements is selected automatically.<br />
    //<br />
    // Server configurations must set one of Certificates, GetCertificate or<br />
    // GetConfigForClient. Clients doing client-authentication may set either<br />
    // Certificates or GetClientCertificate.<br />
    //<br />
    // Note: if there are multiple Certificates, and they don&#8217;t have the<br />
    // optional field Leaf set, certificate selection will incur a significant<br />
    // per-handshake performance cost.<br />
    Certificates []Certificate</p>
<p>这个字段应该是有效的。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：fli123443</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7611</link>
		<dc:creator>fli123443</dc:creator>
		<pubDate>Wed, 13 Apr 2022 08:12:24 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7611</guid>
		<description>记录一下，我的go版本 1.16
使用文章中的方式去设置双向认证有问题
wireshark抓tls的包看，客户端根本没有发送自己的证书给服务端
需要改成下面这段代码：
tr := &amp;http.Transport{
        TLSClientConfig: &amp;tls.Config{
            RootCAs:      pool,
            // Certificates: []tls.Certificate{cliCrt},  在这里设置客户端证书不生效
            GetClientCertificate: func(info *tls.CertificateRequestInfo) (*tls.Certificate, error) {
                    return &amp;cliCrt, nil
	     }, // 需要这样这是客户端证书
        },
    }</description>
		<content:encoded><![CDATA[<p>记录一下，我的go版本 1.16<br />
使用文章中的方式去设置双向认证有问题<br />
wireshark抓tls的包看，客户端根本没有发送自己的证书给服务端<br />
需要改成下面这段代码：<br />
tr := &amp;http.Transport{<br />
        TLSClientConfig: &amp;tls.Config{<br />
            RootCAs:      pool,<br />
            // Certificates: []tls.Certificate{cliCrt},  在这里设置客户端证书不生效<br />
            GetClientCertificate: func(info *tls.CertificateRequestInfo) (*tls.Certificate, error) {<br />
                    return &amp;cliCrt, nil<br />
	     }, // 需要这样这是客户端证书<br />
        },<br />
    }</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：jo饭</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7487</link>
		<dc:creator>jo饭</dc:creator>
		<pubDate>Thu, 27 Aug 2020 12:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7487</guid>
		<description>牛皮！非常清楚</description>
		<content:encoded><![CDATA[<p>牛皮！非常清楚</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：bigwhite</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7342</link>
		<dc:creator>bigwhite</dc:creator>
		<pubDate>Mon, 04 Mar 2019 13:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7342</guid>
		<description>从证书的原理来看，证书是公钥+申请者身份信息的，可以从client端发送的公钥证书中提取身份信息。或者在建立安全通道后，在通道内直接传递身份验证数据。</description>
		<content:encoded><![CDATA[<p>从证书的原理来看，证书是公钥+申请者身份信息的，可以从client端发送的公钥证书中提取身份信息。或者在建立安全通道后，在通道内直接传递身份验证数据。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：404</title>
		<link>https://tonybai.com/2015/04/30/go-and-https/#comment-7341</link>
		<dc:creator>404</dc:creator>
		<pubDate>Mon, 04 Mar 2019 08:50:05 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/?p=1718#comment-7341</guid>
		<description>请问一下，双向认证中，能给 client 端带上用户的唯一标识，server 端可以通过 client 请求体解析出证书中的该标识吗？</description>
		<content:encoded><![CDATA[<p>请问一下，双向认证中，能给 client 端带上用户的唯一标识，server 端可以通过 client 请求体解析出证书中的该标识吗？</p>
]]></content:encoded>
	</item>
</channel>
</rss>
