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

关于证书过期时间的问题 #316

Closed
winderica opened this issue Aug 22, 2019 · 10 comments · Fixed by #317 or #318
Closed

关于证书过期时间的问题 #316

winderica opened this issue Aug 22, 2019 · 10 comments · Fixed by #317 or #318

Comments

@winderica
Copy link
Contributor

测试环境:

  • Android 9.0
  • Chrome 76.0.3809.111
  • whistle 1.16.2

抓https的时候发现chrome报NET::ERR_CERT_VALIDITY_TOO_LONG,找到了类似的issue,提到了是过期时间的问题。
自己签了一个1年过期的根证书,还是报同样的错。
翻了下源码,发现是这一行把过期时间设置成了10年后,手动改成1年就可以了。

@avwo
Copy link
Owner

avwo commented Aug 22, 2019

多谢反馈,下个版本解决这个问题,你可以提个pr,把普通证书有效期改成2年试试

@winderica
Copy link
Contributor Author

感谢回复,pr稍后就提。

@avwo
Copy link
Owner

avwo commented Aug 22, 2019

重新安装whistle再重启试试

@winderica
Copy link
Contributor Author

改成2年(总的duration是36个月)好像还是太长了,1年(24个月)是没问题的,reopen。
chrome的限制好像比39个月的标准更严格。

@winderica winderica reopened this Aug 22, 2019
@avwo
Copy link
Owner

avwo commented Aug 22, 2019

更新后重启whistle 了没,把浏览器也重启一下

@winderica
Copy link
Contributor Author

winderica commented Aug 22, 2019

都重启了。
在chromium源码里找到了判断的逻辑,2018年3月1日后的过期时间被限制在了825天(27个月)以内。
验证了一下确实是这样的:
exp

等下再提交个pr。

@avwo
Copy link
Owner

avwo commented Aug 22, 2019

好的,可以改成1年,测试ok重新提个pr

@winderica
Copy link
Contributor Author

现在应该没问题了。

@LeoEatle
Copy link

升级whistle后似乎要重新安装证书才能生效

@avwo
Copy link
Owner

avwo commented Aug 11, 2020

不需要的,这个不影响根证书。

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