Add comprehensive tests for SSL/TLS module functions#1539
Add comprehensive tests for SSL/TLS module functions#1539mohamedsolaiman wants to merge 3 commits intoOWASP:masterfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThis pull request adds comprehensive test coverage for SSL-related functions in the core library. Changes include expanded test cases for weak hash algorithm detection, timeout/error handling, connection failures, certificate information extraction, and socket connection creation with proper mocking and assertions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 6/8 reviews remaining, refill in 11 minutes and 17 seconds.Comment |
|
PR validation failed: No linked issue and no valid closing issue reference in PR description |
Improved SSL Test Coverage
I was running some pentest engagements where we needed to validate SSL/TLS checks were working correctly, so I ended up writing a bunch of unit tests for the SSL module. Figured these could be useful upstream.
What I added:
1. Extended
is_weak_hash_algotestssha1WithRSAEncryption,md5WithRSAEncryption2. New
TestGetCertInfoclass3. New
TestCreateSocketConnectionclass4. Additional edge cases in existing tests
ssl_certificate_scanwith connection refused (returns None)create_tcp_socketwith connection refusedis_weak_ssl_versionwith socket timeoutRelated to #1452 and #1489.