mirror of
https://github.com/avwo/whistle.git
synced 2026-10-18 14:41:12 +08:00
14a9407b4a
## 问题描述 Python 3.13+ 配合 urllib3 2.6.3 使用 Whistle 作为 HTTPS 代理时,SSL 证书验证失败: ``` urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Missing Authority Key Identifier ``` ## 根本原因 OpenSSL 3.x 和 Python 的 urllib3 对证书链验证更加严格。Whistle 动态生成的服务器证书只包含 `subjectAltName` 扩展,缺少 `authorityKeyIdentifier` 等必要扩展。 ## 解决方案 为生成的证书添加完整的 X.509v3 扩展: - `basicConstraints` (CA:FALSE) - `keyUsage` (digitalSignature, keyEncipherment) - `extKeyUsage` (serverAuth, clientAuth) - `authorityKeyIdentifier` (从 ROOT_CRT 的 SKI 获取) ## 测试环境 - Python 3.13.5 - urllib3 2.6.3 - OpenSSL 3.5.5 - Node.js v24.14.0 - Whistle v2.10.2 此修复确保 Python 严格的 SSL 验证在使用 Whistle 进行 HTTPS 抓包时能够正常通过。