{
  "id": "python/httpx-connecterror-ssl-certificate-verify-failed-untrusted",
  "signature": "httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate is not trusted (_ssl.c:1123) while connecting to 'https://untrusted.example.com'",
  "signature_zh": "httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败：证书不受信任 (_ssl.c:1123)，连接到'https://untrusted.example.com'时",
  "regex": "httpx\\.ConnectError:\\ \\[SSL:\\ CERTIFICATE_VERIFY_FAILED\\]\\ certificate\\ verify\\ failed:\\ certificate\\ is\\ not\\ trusted\\ \\(_ssl\\.c:1123\\)\\ while\\ connecting\\ to\\ 'https://untrusted\\.example\\.com'",
  "domain": "python",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "The server's certificate is signed by a CA that is not trusted by the system.",
  "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": "Adding the certificate to the system trust store incorrectly",
      "why_fails": "Improper installation may still not make it trusted.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using verify=False as a permanent solution",
      "why_fails": "Disables security and is not recommended for production.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Properly install the CA certificate in the system trust store",
      "success_rate": 0.9,
      "how": "# On Windows: import the .crt file into 'Trusted Root Certification Authorities'\n# On macOS: sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ca.crt",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the verify parameter with the CA certificate file",
      "success_rate": 0.85,
      "how": "httpx.get('https://untrusted.example.com', verify='/path/to/ca.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": "2025-08-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}