root@yunxin-ops-tmp2:~# echo -n "31cfa56c-02ba-45cc-8502-3f64a7aebb8c1743562308" | md5sum e60a5263999917f1cc5fd4337bd2fe85 - root@yunxin-ops-tmp2:~# curl -X POST \ "https://test.api.stone.netease.com/kuafu/api/v3/form/submit?gwClientId=724&gwClientUser=wb.zhangjian17&gwTimestamp=1743562308&gwSignature=e60a5263999917f1cc5fd4337bd2fe85" \ -H "Content-Type: application/json" \ -d '{ "processDefId": "<YourProcessDefId>", "variables": { "用途": "调用夸父API进行创建工单", "是否公开": "否", "产品名称": "{\"productId\":\"91454\",\"productValue\":\"夸父系统\",\"responsorValue\":\"[email protected]\"}", "stone网关应用名称": "yjz-test", "负责人": "H17793", "stone网关应用ID": "182", "申请访问的API列表": "api/v2/form/submit", "跟踪者": "H17793", "工单优先级": "普通", "account": "wb.zhangjian17", "mail": "[email protected]" } }' curl: (60) SSL: no alternative certificate subject name matches target host name 'test.api.stone.netease.com' More details here: https://curl.se/docs/sslcerts.html curl failed to verify the legitimacy of the server and therefore could not establish a secure connection to it. To learn more about this situation and how to fix it, please visit the web page mentioned above. root@yunxin-ops-tmp2:~#
时间: 2025-04-07 12:10:06 浏览: 524
从您的命令执行结果来看,`curl` 命令因SSL证书验证失败而无法建立安全连接。具体错误为 `SSL: no alternative certificate subject name matches target host name 'test.api.stone.netease.com'`。这通常意味着服务器提供的SSL证书中的域名与您尝试连接的目标主机名不匹配。
### 解决方案:
#### 1. **检查目标主机名**
确认您使用的URL (`https://test.api.stone.netease.com`) 是否正确无误。如果这是正确的测试环境URL,请继续下一步。
#### 2. **跳过SSL证书验证(仅用于测试)**
如果您确信这是测试环境,并且可以接受跳过SSL验证的风险,可以在 `curl` 命令中添加 `-k` 参数来忽略SSL证书验证:
```bash
curl -k -X POST \
"https://test.api.stone.netease.com/kuafu/api/v3/form/submit?gwClientId=724&gwClientUser=wb.zhangjian17&gwTimestamp=1743562308&gwSignature=e60a5263999917f1cc5fd4337bd2fe85" \
-H "Content-Type: application/json" \
-d '{
"processDefId": "<YourProcessDefId>",
"variables": {
"用途": "调用夸父API进行创建工单",
"是否公开": "否",
"产品名称": "{\"productId\":\"91454\",\"productValue\":\"夸父系统\",\"responsorValue\":\"[email protected]\"}",
"stone网关应用名称": "yjz-test",
"负责人": "H17793",
"stone网关应用ID": "182",
"申请访问的API列表": "api/v2/form/submit",
"跟踪者": "H17793",
"工单优先级": "普通",
"account": "wb.zhangjian17",
"mail": "[email protected]"
}
}'
```
#### 3. **更新本地CA证书**
如果这不是测试环境,或者您希望解决根本问题,建议更新本地的CA证书存储,以确保其包含最新的根证书。您可以使用以下命令安装最新的CA证书包(适用于Debian/Ubuntu系统):
```bash
sudo apt-get update && sudo apt-get install ca-certificates
```
#### 4. **联系管理员或服务提供商**
如果上述方法都无法解决问题,建议联系 `test.api.stone.netease.com` 的管理员或服务提供商,确认他们提供的SSL证书配置是否正确,并获取进一步的支持。
### 其他注意事项:
- **时间戳**:确保 `gwTimestamp` 是当前的时间戳,否则可能导致签名无效。
- **签名算法**:确保生成的 `gwSignature` 使用了正确的算法,并且所有参数都已正确拼接。
如果您有更多问题或需要进一步的帮助,请随时告知!
阅读全文
相关推荐















