查看证书评级

POST
https://daas.digicert.com/apicontroller/v1/sslrating/getCertificateRating

获取证书的整体安全性评级以及已知风险和问题。通过该端点请求,最终用户可以钻取或交叉关联单个证书的安全性评级以及决定整体评级的所有要素。

cURL
curl -X POST \
  https://daas.digicert.com/apicontroller/v1/sslrating/getCertificateRating \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
    "certId": "fb92ee3a2fd0cb6549e58c252f8787f467bfbeff",
    "accountId": "126993",
    "divisionIds": []
}'
Python
import requests

url = "https://daas.digicert.com/apicontroller/v1/sslrating/getCertificateRating"

payload = "{\n    \"certId\": \"fb92ee3a2fd0cb6549e58c252f8787f467bfbeff\",\n    \"accountId\": \"126993\",\n    \"divisionIds\": []\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json",
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
Go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://daas.digicert.com/apicontroller/v1/sslrating/getCertificateRating"

	payload := strings.NewReader("{\n    \"certId\": \"fb92ee3a2fd0cb6549e58c252f8787f467bfbeff\",\n    \"accountId\": \"126993\",\n    \"divisionIds\": []\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))

}
NodeJS
var request = require("request");

var options = { method: 'POST',
  url: 'https://daas.digicert.com/apicontroller/v1/sslrating/getCertificateRating',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: 
   { certId: 'fb92ee3a2fd0cb6549e58c252f8787f467bfbeff',
     accountId: '126993',
     divisionIds: [] },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
200 OK
{
    "data": {
        "categories": [
            {
                "name": "CabForumCategory",
                "criteria": [
                    {
                        "name": "AuthorityInfoAccess",
                        "value": "",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": [
                            {
                                "name": "OCSP",
                                "value": "http://ocsp.ca.com",
                                "issues": null,
                                "colorCode": null
                            },
                            {
                                "name": "CaIssuers",
                                "value": "http://crt.url.com/RSADomainValidationSecureServerCA.crx",
                                "issues": null,
                                "colorCode": null
                            }
                        ],
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "CRLDistributionPoints",
                        "value": "http://crl.url.com/RSADomainValidationSecureServerCA.crx",
                        "issues": "null",
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "BasicConstraint",
                        "value": "Certificate Authority : No",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "ExtendedKeyUsage",
                        "value": "TLS Web Client Authentication,TLS Web Server Authentication",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "KeyUsage",
                        "value": "digitalSignature,keyEncipherment",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "CertPolicies",
                        "value": "Policy ID #1 : 1.3.6.1.4.1.6449.1.2.2.7,CPS URI : https://secure.url.com/CPS,Policy ID #2 : 2.23.140.1.2.1",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "InternalNames",
                        "value": "No",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    }
                ]
            },
            {
                "name": "CertStatusCategory",
                "criteria": [
                    {
                        "name": "IsCertValid",
                        "value": "Yes",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    }
                ]
            },
            {
                "name": "CertAttributeCategory",
                "criteria": [
                    {
                        "name": "EndEntityCertHashAlgorithmStrength",
                        "value": "SHA2 family",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "EndEntityCertKeyStrength",
                        "value": "RSA 2048",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "IsAliasMatchSAN",
                        "value": "Yes",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "CertType",
                        "value": "Domain Validation (DV)",
                        "issues": "true",
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    }
                ]
            },
            {
                "name": "KnownRisksCategory",
                "criteria": [
                    {
                        "name": "NoNullCharacterInCN",
                        "value": "Yes",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "SameKeyNotUsedInChain",
                        "value": "Yes",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "SingleCNInDN",
                        "value": "Yes",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    },
                    {
                        "name": "ValidCertContent",
                        "value": "Yes",
                        "issues": null,
                        "colorCode": null,
                        "message": null,
                        "data": null,
                        "suggestion": null,
                        "kbLink": null
                    }
                ]
            }
        ],
        "rating": "Secure",
         “ratingNotice”: “Restricted to Secure because of DV certificate. Upgrade to OV or EV certificate to improve  the rating.”,
        "isPrivateCert": false,
        "cn": "*.aparat.com",
        "certStatus": "Valid",
        "caType": "PUBLIC"
    }
}

请求参数

名称 请求/选项 类型 描述
accountId 必填 string 帐号。
divisionIds 可选 array 分区 ID。
certId 必填 string 为在端点上找到的证书生成的唯一 DigiCert ID。从列出证书请求获取证书 ID。

响应参数

名称 类型 描述
data object 容器。
.. categories array 决定安全性评级的评估标准的容器。
.. .. name string 评估类别的名称。
.. .. criteria array 决定安全性评级的详细信息的容器。
.. .. .. name string 评估标准。
.. .. .. value string 标准值。
.. .. .. issues string 是否存在安全性风险。
.. .. .. colorCode string 警告级别。
可能的值:1=有风险(高),2=警告(中),null
.. .. .. message string 摘要。
.. .. .. data array 子类别的容器。
.. .. .. .. name string 评估标准。
.. .. .. .. value string 标准值。
.. .. .. .. issues string 是否存在安全性风险。
.. .. .. .. colorCode string 警告级别。
可能的值:1=有风险(高),2=警告(中),null
.. .. .. suggestion string 详细信息和/或解决方案。
.. .. .. kbLink string 指向附加信息的链接。
.. rating string 证书安全性评级,基于行业标准和证书设置。
.. ratingNotice string 关于证书安全性评级的附加备注。
.. isPrivateCert bool 证书是否是从私有根 CA 颁发的。
.. cn string 公用名。
.. certStatus string 状态证书的
.. caType string 证书颁发机构来源的类型,例如,公共或私有。