> For the complete documentation index, see [llms.txt](https://docs.ipwo.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipwo.net/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/ssl-zheng-shu-cuo-wu.md).

# SSL 证书错误

如果出现：

```
SSL certificate verify failed
SSL Error
CERTIFICATE_VERIFY_FAILED
```

通常表示：

```
HTTPS 证书校验失败
```

这是开发者使用代理或请求 HTTPS 网站时的常见问题。

***

### 一、常见原因

#### 1. 本地证书环境异常

例如：

* 系统证书缺失
* Python CA 证书异常
* OpenSSL 版本过旧

***

#### 2. 网络环境问题

部分国内网络环境可能导致：

```
HTTPS 握手异常
```

建议优先使用：

* 海外 VPS
* 海外云服务器

***

#### 3. HTTPS 请求被拦截

可能出现：

* 防火墙拦截
* 中间代理干扰
* SSL 握手失败

***

#### 4. 目标网站证书异常

部分网站：

```
证书配置不完整
```

可能导致验证失败。

***

### 二、常见报错示例

#### cURL

```bash
curl: (60) SSL certificate problem
```

***

#### Python requests

```python
SSLError: CERTIFICATE_VERIFY_FAILED
```

***

### 三、推荐排查方式

#### 1. 先测试代理是否正常

```bash
curl -x http://us.ipwo.net:7878 -U username_custom_zone_us:password http://ipinfo.io
```

***

#### 2. 临时关闭 SSL 验证（仅测试）

**cURL**

```bash
curl -k \
-x http://us.ipwo.net:7878 \
-U username_custom_zone_us:password \
https://ipinfo.io
```

***

**Python**

```python
requests.get(url, verify=False)
```

***

#### ⚠️ 注意

```
仅建议调试测试使用
```

生产环境不建议长期关闭 SSL 验证。

***

### 四、推荐解决方案

推荐：

* 更新系统证书
* 更新 OpenSSL
* 使用海外 VPS
* 更换 DNS

避免：

* 老旧 Python 环境
* 国内网络直接高频请求海外 HTTPS 网站

***

### 五、推荐排查流程

```
1. curl 测试代理
↓
2. 测试 HTTPS 请求
↓
3. 临时关闭 SSL 验证
↓
4. 更新证书环境
↓
5. 再次测试
```

***

### 六、相关文章

* [超时 Timeout](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/chao-shi-timeout.md)
* [DNS 解析失败](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/dns-jie-xi-shi-bai.md)
* [代理连接失败](/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/dai-li-lian-jie-shi-bai.md)
* [如何检测代理是否生效](/dai-li-jian-ce-yu-yin-si-an-quan/ru-he-jian-ce-dai-li-shi-fou-sheng-xiao.md)
* [API 调用与批量采集](/dai-li-ji-chu-zhi-shi/api-diao-yong-yu-pi-liang-cai-ji.md)
* [为什么需要海外网络环境](/dai-li-ji-chu-zhi-shi/wei-shen-me-xu-yao-hai-wai-wang-luo-huan-jing.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ipwo.net/kai-fa-zhe-wen-dang/chang-jian-cuo-wu/ssl-zheng-shu-cuo-wu.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
