Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

国密TLS握手失败 #19

Open
Randyshu2018 opened this issue Feb 24, 2021 · 0 comments
Open

国密TLS握手失败 #19

Randyshu2018 opened this issue Feb 24, 2021 · 0 comments

Comments

@Randyshu2018
Copy link

Randyshu2018 commented Feb 24, 2021

简述:orderer/peer启动正常的情况下, 使用peer命令行会创建通道失败,通过断点调试发现是在握手时添加了一层证书非空校验,但是默认情况下peer命令行构建的tls.config并没有设置Certificates这个属性,所以就会出现这个错误

var chainToSend *Certificate
	var certRequested bool
	certReq, ok := msg.(*certificateRequestMsgGM)
	if ok {
		certRequested = true
		hs.finishedHash.Write(certReq.marshal())

		if chainToSend, err = hs.getCertificate(certReq); err != nil || chainToSend.Certificate == nil {
			c.sendAlert(alertInternalError)
			return err
		}

		msg, err = c.readHandshake()
		if err != nil {
			return err
		}
	}

期望:去掉这层限制,我去掉之后整个流程是能够正常跑通的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant