lolly/internal/ssl/AGENTS.md
xfy 95030cd68a docs: 更新 AGENTS.md 文档
添加各模块的 AGENTS.md 文档文件,记录模块职责和代码结构

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-03 14:07:42 +08:00

1.1 KiB
Raw Blame History

ssl

Purpose

SSL/TLS 模块提供证书加载、OCSP Stapling 和 TLS 配置管理功能。

Key Files

File Description
ssl.go SSL/TLS 核心证书加载、TLS 配置、SNI 支持、会话缓存
ocsp.go OCSP Stapling在线证书状态查询、缓存、自动刷新
ssl_test.go SSL/TLS 测试
ocsp_test.go OCSP 测试

For AI Agents

Working In This Directory

  • 支持多证书加载,按 SNI 匹配
  • OCSP Stapling 提升 TLS 握手性能
  • TLS 配置强制使用安全参数TLS 1.2+、强密码套件)
  • 会话缓存减少握手开销

Testing Requirements

  • 运行测试:go test ./internal/ssl/...
  • 测试证书加载、OCSP 查询、TLS 配置

Common Patterns

  • 证书格式支持 PEM
  • OCSP 响应缓存 1 小时
  • 会话票据自动轮换

Dependencies

Internal

  • ../config/ - SSL 配置

External

  • crypto/tls - Go 标准库 TLS 实现
  • golang.org/x/crypto/ocsp - OCSP 协议支持