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

HTTPS连接的时候,怎么确定收到的包是服务器发来的(中间人攻击)? #48

Open
fengxiaop opened this issue Apr 12, 2022 · 4 comments

Comments

@fengxiaop
Copy link
Contributor

这个问题好像闲置了许久没有问答了 作者是不是太忙了把他忘记了

@wolverinn
Copy link
Owner

确实忘了,不过感谢提醒,这两周我补一下。如果你有一个答案的话也可以直接提一个pull request

@fengxiaop
Copy link
Contributor Author

好的 明天有空提一下pull request

@fengxiaop
Copy link
Contributor Author

1.验证域名、有效期等信息是否正确。证书上都有包含这些信息,比较容易完成验证;
2.判断证书来源是否合法。每份签发证书都可以根据验证链查找到对应的根证书,操作系统、浏览器会在本地存储权威机构的根证书,利用本地根证书可以对对应机构签发证书完成来源验证;

3.判断证书是否被篡改。需要与 CA 服务器进行校验;

4.判断证书是否已吊销。通过CRL(Certificate Revocation List 证书注销列表)和 OCSP(Online Certificate Status Protocol 在线证书状态协议)实现,其中 OCSP 可用于第3步中以减少与 CA 服务器的交互,提高验证效率

这是我提的pull request的答案 但是好像不太会操作 不知道操作对没对 (我可以成为这项目的contributors之一吗)

@wolverinn
Copy link
Owner

谢谢你的pull request~当然可以,给你加上了哈哈

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

No branches or pull requests

2 participants