{
  "id": "nginx/ssl-certificate-verify-failed-self-signed",
  "signature": "SSL: certificate verify failed: self-signed certificate in certificate chain",
  "signature_zh": "SSL 证书验证失败：证书链中包含自签名证书",
  "regex": "SSL: certificate verify failed: self-signed certificate in certificate chain",
  "domain": "nginx",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "The upstream server's SSL certificate is self-signed or its CA is not trusted by nginx's default CA bundle, causing the handshake to fail.",
  "root_cause_type": "generic",
  "root_cause_zh": "上游服务器的 SSL 证书是自签名的或其 CA 未被 nginx 的默认 CA 包信任，导致握手失败。",
  "versions": [
    {
      "version": "nginx-1.24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-1.25.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "nginx-1.26.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "It bypasses security, leaving the connection vulnerable to MITM attacks.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This directive controls client certificate verification, not upstream verification.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Nginx may not automatically pick up system CA changes unless the bundle path is explicitly set.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add the self-signed certificate to nginx's trusted CA file and set proxy_ssl_trusted_certificate. Example:\nlocation / {\n    proxy_pass https://upstream;\n    proxy_ssl_trusted_certificate /etc/nginx/ssl/upstream-ca.crt;\n    proxy_ssl_verify on;\n    proxy_ssl_verify_depth 2;\n}",
      "success_rate": 0.9,
      "how": "Add the self-signed certificate to nginx's trusted CA file and set proxy_ssl_trusted_certificate. Example:\nlocation / {\n    proxy_pass https://upstream;\n    proxy_ssl_trusted_certificate /etc/nginx/ssl/upstream-ca.crt;\n    proxy_ssl_verify on;\n    proxy_ssl_verify_depth 2;\n}",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the upstream is internal and security is not critical, temporarily disable verification for testing: proxy_ssl_verify off; (not recommended for production).",
      "success_rate": 0.8,
      "how": "If the upstream is internal and security is not critical, temporarily disable verification for testing: proxy_ssl_verify off; (not recommended for production).",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Add the self-signed certificate to nginx's trusted CA file and set proxy_ssl_trusted_certificate. Example:\nlocation / {\n    proxy_pass https://upstream;\n    proxy_ssl_trusted_certificate /etc/nginx/ssl/upstream-ca.crt;\n    proxy_ssl_verify on;\n    proxy_ssl_verify_depth 2;\n}",
    "If the upstream is internal and security is not critical, temporarily disable verification for testing: proxy_ssl_verify off; (not recommended for production)."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ssl_verify",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}