使用此端点颁发证书。
补发证书会将现有证书替换为具有不同信息(例如公用名、CSR、签名哈希等)的新证书。
curl -X POST \
'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/reissue' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"certificate": {
"common_name": "example.com",
"dns_names": [
"sub.example.com"
],
"csr": "<csr>",
"server_platform": {
"id": 2
},
"signature_hash": "sha256"
}
}'
import requests
url = "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/reissue"
payload = "{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"sub.example.com\"\n ],\n \"csr\": \"<csr>\",\n \"server_platform\": {\n \"id\": 2\n },\n \"signature_hash\": \"sha256\"\n }\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/reissue"
payload := strings.NewReader("{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"sub.example.com\"\n ],\n \"csr\": \"<csr>\",\n \"server_platform\": {\n \"id\": 2\n },\n \"signature_hash\": \"sha256\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var request = require("request");
var options = { method: 'POST',
url: 'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/reissue',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate:
{ common_name: 'example.com',
dns_names: [ 'sub.example.com' ],
csr: '<csr>',
server_platform: { id: 2 },
signature_hash: 'sha256' } },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"id": 112233,
"requests": [
{
"id": 332211
}
]
}
{
"id": 112233,
"certificate_id": 111112
}
名称 | 请求/选项 | 类型 | 描述 |
---|---|---|---|
certificate | 必填 | object | 有关证书的详细信息。 |
.. common_name | 必填 | string | 要保护的域。 |
.. dns_names | 可选 | array | 要保护的附加域。 |
.. csr | 必填 | string |
证书签名请求 (CSR)。 请参阅词汇表 - CSR 要求 |
.. server_platform | 可选 | object |
服务器平台类型。 对代码签名证书订单必填。 默认值: -1 (其他)
|
.. .. id | 必填 | int |
服务器平台 ID。 请参阅词汇表 - 服务器平台 |
.. signature_hash | 必填 | string | 用于给证书签名的哈希算法。 |
comments | 可选 | string | 有关补发的消息。 |
skip_approval | 可选 | bool |
指定订单是否应跳过审批步骤并且立即提交验证并且在完成验证后颁发。 默认值: false
|
名称 | 类型 | 描述 |
---|---|---|
id | int | 订单编号。 |
certificate_id | int |
证书编号。 仅当 skip_approval 是 true 时返回。
|
requests | array | 请求的列表。 |
.. id | int | 请求编号。 |