{
  "id": "python/requests-sslerror-wrong-hostname",
  "signature": "requests.exceptions.SSLError: HTTPSConnectionPool(host='example.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate does not match 'example.com'')))",
  "signature_zh": "requests.exceptions.SSLError: HTTPSConnectionPool(host='example.com', port=443): 超过最大重试次数 (由SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败：主机名不匹配，证书与'example.com'不匹配'))引起)",
  "regex": "requests\\.exceptions\\.SSLError:\\ HTTPSConnectionPool\\(host='example\\.com',\\ port=443\\):\\ Max\\ retries\\ exceeded\\ with\\ url:\\ /\\ \\(Caused\\ by\\ SSLError\\(SSLCertVerificationError\\(1,\\ '\\[SSL:\\ CERTIFICATE_VERIFY_FAILED\\]\\ certificate\\ verify\\ failed:\\ Hostname\\ mismatch,\\ certificate\\ does\\ not\\ match\\ 'example\\.com''\\)\\)\\)",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The server's SSL certificate is issued for a different hostname than the one being accessed.",
  "root_cause_type": "generic",
  "root_cause_zh": "服务器的SSL证书是为与正在访问的主机名不同的主机名颁发的。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Setting verify=False to ignore SSL verification entirely",
      "why_fails": "Disabling SSL verification exposes the connection to man-in-the-middle attacks and does not solve the hostname mismatch for valid certificates.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Updating the requests library to the latest version",
      "why_fails": "The issue is not a library bug but a certificate configuration problem on the server side.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use the correct hostname that matches the certificate's Common Name or Subject Alternative Names",
      "success_rate": 0.95,
      "how": "requests.get('https://correct-hostname.com')",
      "condition": "",
      "sources": []
    },
    {
      "action": "Provide the certificate via verify parameter if the server uses a custom CA",
      "success_rate": 0.85,
      "how": "requests.get('https://example.com', verify='/path/to/custom-ca.pem')",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}