惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
P
Privacy International News Feed
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 叶小钗
F
Fortinet All Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 最新话题
AWS News Blog
AWS News Blog
Engineering at Meta
Engineering at Meta
Attack and Defense Labs
Attack and Defense Labs
Recent Announcements
Recent Announcements
Recent Commits to openclaw:main
Recent Commits to openclaw:main
PCI Perspectives
PCI Perspectives
Cloudbric
Cloudbric
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
IT之家
IT之家
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
J
Java Code Geeks
M
MIT News - Artificial intelligence
Cisco Talos Blog
Cisco Talos Blog
V2EX - 技术
V2EX - 技术
Webroot Blog
Webroot Blog
Microsoft Security Blog
Microsoft Security Blog
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
G
Google Developers Blog
W
WeLiveSecurity
罗磊的独立博客
P
Privacy & Cybersecurity Law Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
T
Tailwind CSS Blog
V
Visual Studio Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Secure Thoughts
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Full Disclosure
Blog — PlanetScale
Blog — PlanetScale
The Last Watchdog
The Last Watchdog
P
Proofpoint News Feed

Hunsh's Blog

生成个人的 Github PR List 如何选择合适的加密手段 Nginx SNI Proxy 如何优雅导入 k8s.io/kubernetes Make Go mod and Git to use specify .netrc 多架构镜像的体积优化 使用 buildkit 进行多架构构建并提取产物 如何修改镜像 layer(以 sourcemap-less grafana 为例) acme.sh 自动化 Google CA 申请证书 微信小程序嵌入任意公众号文章 k8s && bazel 项目从 go1.20 升级 go1.21 go serve http and https on same port typecho 迁移到 hexo 实现 hexo 文章和资源在同一目录下 流式数据专用的 mine-type Golang 正向代理对于 Host 的处理 (RFC 7230) 分享 MacOS 的一些系统fix脚本(dns、sleep) prometheus rate/increase/delta/sum等函数不符合预期或出现小数的原理 [油猴脚本] USTB Everywhere 为校外访问添加访问任意网站的能力
golang mitm 遇到的问题
2023-08-04 · via Hunsh's Blog

最近在做一个 cache server,打算支持中间人方案。具体的实施就是自签一个 ca,提供给用户添加到系统进行信任,用这个 ca 去动态签发用户的目标站点证书。其实也就是一个 burp 的样子。

具体的代码实现会在下一篇文章中讲述,这篇只讨论遇到的问题。

1. SerialNumber 序列号是什么

https://security.stackexchange.com/questions/35691/what-is-the-difference-between-serial-number-and-thumbprint

这里面说的比较明白,序列号需要对于 CA 唯一,是一个 big int,我直接随机了。在写死的时候浏览器会对序列号报错。

2. 出现 common name not found

x509.Certificate.Subject.CommonName 不得为空,一般会为第一个 DNSName.

3. 浏览器证书信任了,但是在 MacOS curl 的时候提示 unable to get local issuer certificate

这个也找了老半天,最后根据经验猜测和搜索,认为是没有 bundle certificate,bundle 完错误消失。

4. 浏览器证书信任了,但是在 MacOS curl 的时候提示 self signed certificate in certificate chain

这个错误超级恶心,因为提示信息和错误不符,真正的原因可以使用 safari 来查看,会报告“证书不符合标准”,后来在 https://github.com/golang/go/issues/51991#issuecomment-1081998366 才看到一个可能的原因——签发时间过长(我一开始签发的是 10 年的)。

后来翻阅互联网找到了 apple 的政策,https://support.apple.com/en-us/HT210176,对于自签名证书最多允许 825 天的签发时间。同时对于公开可信证书,还有 398 天的限制以及 sct 要求。

5. 泛域名证书对于顶级域不生效

比如 *.net 是不对于 hunsh.net 生效的。