---
title: 返回码与自签证书通过验证
description: "**表1 错误码说明**"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevkithistory/devkit_24_t50/usermanual/KunpengDevKit_0124.html
sourcePath: /source/zh/kunpengdevkithistory/devkit_24_t50/usermanual/KunpengDevKit_0124.html
indexId: f6c6f4546be76d101053ab912a5eb16e0115c0331dcc433f81c2a98cf2f9666080
---
# 返回码与自签证书通过验证

#### 错误码


**表1 错误码说明**

| 错误场景 | 返回代码 | 错误信息 |
| --- | --- | --- |
| client\_id缺失 | 8101 | 缺少参数client\_id |
| authorization\_code缺失 | 8102 | 缺少参数authorization\_code |
| grant\_type缺失 | 8103 | 缺少参数grant\_type |
| client\_secret缺失 | 8104 | 缺少参数client\_secret |
| access\_token缺失 | 8105 | 缺少参数access\_token |
| refresh\_token缺失 | 8106 | 缺少参数refresh\_token |
| redirect\_uri缺失 | 8107 | 缺少参数redirect\_uri |
| client\_id无效 | 8201 | 参数client\_id非法 |
| authorization\_code无效 | 8202 | 参数authorization\_code非法 |
| grant\_type无效 | 8203 | 参数grant\_type非法 |
| client\_secret无效 | 8204 | 参数client\_secret非法 |
| access\_token无效 | 8205 | 参数access\_token非法 |
| refresh\_token无效 | 8206 | 参数refresh\_token非法 |
| redirect\_uri无效 | 8207 | 参数redirect\_uri非法 |
| 内部资源错误 | 8500 | 服务器内部资源错误 |


#### 自签证书

1. 产生根CA证书。
  1 2 openssl genrsa -out ca.key 4096 openssl req -new -x509 -sha256 -days 360 -subj "/C=CN/CN=code-server-ca" -key ca.key -out ca.crt

2. 产生服务器CSR。
  1 2 openssl genrsa -out cert.key 4096 openssl req -new -sha256 -key cert.key -subj "/C=CN/CN=code-server" -out cert.csr

3. 产生服务器证书。
  以下命令中IP地址需替换为部署的Master节点的IP地址。

  1 openssl x509 -req -extfile <(cat /etc/pki/tls/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:code-server,IP:x.x.x.x")) -extensions SAN -CA ca.crt -CAkey ca.key -CAcreateserial -days 360 -in cert.csr -out cert.crt

4. 将操作步骤二中生成的cert.csr与操作步骤三中生成的cert.crt替换原有服务器证书，将操作步骤一中产生的根证书路径传入DevKit安装脚本中用于证书验证。
