{
  "id": "python/requests-sslerror-self-signed-certificate",
  "signature": "requests.exceptions.SSLError: HTTPSConnectionPool(host='internal.example.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain')))",
  "signature_zh": "requests.exceptions.SSLError: HTTPSConnectionPool(host='internal.example.com', port=443): 超过最大重试次数 (由SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败：证书链中存在自签名证书'))引起)",
  "regex": "requests\\.exceptions\\.SSLError:\\ HTTPSConnectionPool\\(host='internal\\.example\\.com',\\ port=443\\):\\ Max\\ retries\\ exceeded\\ with\\ url:\\ /\\ \\(Caused\\ by\\ SSLError\\(SSLCertVerificationError\\(1,\\ '\\[SSL:\\ CERTIFICATE_VERIFY_FAILED\\]\\ certificate\\ verify\\ failed:\\ self\\ signed\\ certificate\\ in\\ certificate\\ chain'\\)\\)\\)",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The server uses a self-signed certificate that is not trusted by the default CA bundle.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器使用自签名证书，默认CA包不信任该证书。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Setting verify=False globally",
      "why_fails": "Disables security checks, making the connection vulnerable to attacks.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Adding the certificate to the system trust store without proper configuration",
      "why_fails": "The system trust store may not be used by Python's requests library by default.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Provide the self-signed certificate file to verify parameter",
      "success_rate": 0.9,
      "how": "requests.get('https://internal.example.com', verify='/path/to/cert.pem')",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a custom CA bundle that includes the self-signed certificate",
      "success_rate": 0.85,
      "how": "requests.get('https://internal.example.com', verify='/path/to/custom-ca-bundle.crt')",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-22",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}