接口名称 | 生成CSR和私钥 |
URL | [ POST ] /api/ssl/v3/tools/csr_generator |
功能 | 生成CSR和私钥 |
Query参数
参数名称 | 参数类型 | 必填 | 说明 |
---|---|---|---|
_format | string | 必需 | 接口数据格式 目前支持 json |
Body参数
Content-Type: application/json参数名称 | 参数类型 | 必填 | 说明 |
---|---|---|---|
domain | string | 必需 | 申请证书的域名 |
org | string | 可选 | 组织名称 |
country | string | 可选 | 国家/地区的两位字母代码 例如中国 CN |
locality | string | 可选 | 城市 |
state | string | 可选 | 省份 |
department | string | 可选 | 部门名称 |
algorithms | string | 可选 | 加密算法 支持 rsa ecc sm2 ,如未提供,默认采用rsa |
san | string | 可选 | 附加域名 多个域名请用英文逗号隔开 |
请求示例 : 生成CSR和私钥
{ "domain": "www.domain.xyz", "org": "网络科技有限公司", "country": "CN", "locality": "广州", "state": "广东", "department": "IT", "algorithms": "rsa", "san": "aaa.com,bbb.com" }
返回值
参数名称 | 参数类型 | 必填 | 说明 |
---|---|---|---|
code | integer | 必需 | 状态码 成功将返回 200 |
message | string | 必需 | 状态描述 如请求出错,显示具体错误信息 |
data | object | 可选 | |
data . csr | string | 可选 | 证书签名请求代码 如未提供,将按 common_name 自动生成CSR |
data . key | string | 可选 | 私钥 |
返回示例
{ "code": 200, "message": "Command completed successfully", "data": { "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIDAzCCAesCAQAweDEXMBUGA1UEAwwOd3d3LmRvbWFpbi54eXoxITAfBgNVBAoM\nGOe9kee7nOenkeaKgOaciemZkOWFrOWPuDELMAkGA1UECwwCSVQxCzAJBgNVBAYT\nAkNOMQ8wDQYDVQQHDAblub/lt54xDzANBgNVBAgMBuW5v+S4nDCCASIwDQYJKoZI\nhvcNAQEBBQADggEPADCCAQoCggEBAKpCMj0duc8mnVcWqnw4Sfo4eJ/H6m7rAM6J\nmuNmoo5G3tHlWVEdtXXMim6Sb1SZHsx/+htXLffT04eKotcLdGpMFIpI+2U5Anyt\ndvsYG+OYQvOQ4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