Go crypto/tls Config.Clone session resumption pitfalls (CVE-2025-68121)

Posted on Wed 25 February 2026 in Tech • Tagged with go, security, tls, cve

CVE-2025-68121 涉及 Go crypto/tls 的两个会话恢复(session resumption)问题:Config.Clone 复制了自动生成的 session ticket keys,导致不同 tls.Config 之间意外共享会话票据;以及服务端在判断会话是否可恢复时,只检查 leaf 证书过期而忽略完整证书链,可能让过期链条下的会话继续被恢复。


Continue reading

Debug Build 的两种哲学:C++ 宏 vs Go 链接器注入

Posted on Tue 03 February 2026 in Journal • Tagged with C++, Go, build, debug, compilation, best-practices

从 C++ 的 -DDEBUG 宏到 Go 的 -ldflags -X,聊聊两种语言在"条件编译"上的不同哲学,以及 Go 独有的 Build Tags 玩法。


Continue reading

Go 微服务访问控制之 Casbin 实践指南

Posted on Sun 13 July 2025 in Journal • Tagged with journal, blog, go, casbin, authentication, authorization, microservice

详细介绍如何在 Go 微服务中集成 Casbin 实现灵活的访问控制,包括 JWT 认证和基于角色的权限管理


Continue reading

通过通信来共享内存, 而不是通过共享内存来通信

Posted on Wed 26 March 2025 in Journal • Tagged with go, blog

Daily minute


Continue reading

go 语言的常见陷阱

Posted on Tue 25 March 2025 in Journal • Tagged with go, blog

Daily minute


Continue reading

边车模式的协议设计

Posted on Sat 22 March 2025 in Journal • Tagged with go, pattern

Daily minute


Continue reading

用 WebRTC 和 Pion 打造一款网络录音机

Posted on Sun 09 March 2025 in Journal • Tagged with go, blog

Daily minute


Continue reading