Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复 TLS 证书 SHA-256 指纹被重复转为十六进制的问题。OpenSSL 的
digest()已返回带冒号的 ASCII 十六进制文本,再调用.hex()会得到 190 个字符,无法与证书的 SHA-256 值比较。现在返回文档约定的 64 位小写十六进制字符串。List of files changed and why
crawl4ai/ssl_certificate.py:解码并规范化 OpenSSL 指纹。tests/unit/test_ssl_fingerprint.py:使用本地生成的真实证书,对照 DER 的 SHA-256,并检查 JSON、PEM 和 DER 导出。How Has This Been Tested?
python -m pytest tests/unit/test_ssl_fingerprint.py -q:2 passed。git diff --check通过。网络传输使用模拟对象,证书解析和哈希是真实实现。未运行真实网络或浏览器集成测试。Checklist
AI 披露:问题分析、代码和上述验证由 OpenAI Codex 完成,尚未经人工审阅。