525 policy network_error ai_generated true

错误525:SSL握手失败

Error 525: SSL handshake failed

ID: policy/cloudflare-ssl-tls-mismatch

其他格式: JSON · Markdown 中文 · English
90%修复率
84%置信度
1证据数
2024-01-05首次发现

版本兼容性

版本状态引入弃用备注
Cloudflare (2024-02) active
Nginx 1.24 active

根因分析

Cloudflare的SSL/TLS设置(例如完全或完全(严格))要求源服务器上有有效的证书;不匹配或自签名证书会导致握手失败。

English

Cloudflare's SSL/TLS setting (e.g., Full or Full (strict)) requires a valid certificate on the origin server; mismatched or self-signed certificates cause handshake failure.

generic

官方文档

https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-525-ssl-handshake-failed

解决方案

  1. Install a valid SSL certificate on the origin server (e.g., using Let's Encrypt: `sudo certbot --nginx -d example.com`) and set Cloudflare SSL/TLS to 'Full (strict)'.
  2. Temporarily set Cloudflare SSL/TLS to 'Flexible' to bypass the handshake, then fix the origin certificate.

无效尝试

常见但无效的做法:

  1. 80% 失败

    This exposes traffic to man-in-the-middle attacks and may break HTTPS-only features.

  2. 60% 失败

    The issue may be an incomplete chain or unsupported cipher, not expiration.

  3. 70% 失败

    This bypasses the error but leaves traffic unencrypted between Cloudflare and origin.