获取证书响应

将一组证书请求提交到证书颁发机构 (CA) 以进行处理。

重要

证书响应数可能会超过请求数。 某些配置文件模板可以配置为在服务器上生成密钥/请求,或者具有外部证书。

注意

本文中的 URL 相对于在 API 部署期间选择的主机名,例如 https://api.contoso.com

请求

方法 请求 URL
POST /CertificateManagement/api/v1.0/requests/{id}/certificatedata

URL 参数

参数 说明
id 必需。 对应于从中提取策略的配置文件模板的 GUID。

请求标头

有关常见请求标头,请参阅CM 中的 HTTP 请求和响应标头REST API服务详细信息

请求正文

请求正文包含以下属性:

属性 说明
pfxpassword 用于保护 PFX 中任何个人信息Exchange (密码) 调用返回的结果。
certificaterequests 客户端生成的证书请求列表。 必须使用 CertificateRequestGenerationOptions 对象中指定的参数生成请求。 有关详细信息,请参阅获取 证书请求生成选项
comments 一个字符串,其中包含在操作的事件历史记录中记录的任何附加注释。

响应

本部分介绍响应。

响应代码

代码 说明
200 OK
403 禁止
500 内部错误

响应头

有关常见的响应标头,请参阅 CM 中的 HTTP 请求和响应标头REST API 服务详细信息

响应正文

成功后,返回具有以下属性的 JSON 序列化 Microsoft.Clm.Shared.Certificates.Certificate 对象的列表:

属性 说明
CertificateId 证书 ID。
错误 处理证书请求时出错。
Flags 描述证书的标志。
IsExternal 一个布尔值,该值指示证书是否是外部证书。
isKeyHistory 一个布尔值,该值指示证书是否是密钥历史记录证书。
isPfx 一个布尔值,该值指示证书请求响应是否是 PFX 格式。
isPkcs7 一个布尔值,该值指示证书请求响应是否是 PKCS #7 格式。
isServerGenerated 一个布尔值,该值指示证书是否由服务器生成。
Pfx PFX 证书 blob。
Pkcs7 PKCS #7 证书 blob。
TemplateCommonName 证书的证书模板公用名。
UseLocalMachineStore 一个布尔值,该值指示该证书是否用于本地计算机证书存储。

示例

本部分提供了一个示例,用于将一组证书请求提交到 CA 进行处理。

示例:请求

POST /CertificateManagement/api/v1.0/requests/C6BAD97C-F97F-4920-8947-BE980C98C6B5/certificatedata HTTP/1.1

{
    "pfxpassword":"6b75162c-b3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+fP6oMdWRO8VWGDAVLy1nnlvnHIiWst1oOKUAdY7kG42FjYQ4HoexrYwfe\r\nrCWubI8248BljPicszpZpP1wL7DTU6z+er/pSHN3tN9Z//be+hY0rbJ430KgNFzZ\r\nV6bEQIpKO6SJX4aL4h7GO9goqBtTT4XbV3yAHwxNdnZLId/4HPOEwSSTtey6eMAd\r\n"
    ]
}

示例:响应

HTTP/1.1 200 OK

[
    {
        "TemplateCommonName":"ContosoVirtualSmartCardLimitedRelease-KSP",
        "CertificateId":0,
        "Flags":65536,
        "UseLocalMachineStore":false,
        "Error":null,
        "Pkcs7":"MIIUhgYJKoZIhvcNAQcCoIIUdzCCFHMCAQMxCzAJBgUrDgMCGgUAMH0GCCsGAQUF\r\nBwwDoHEEbzBtMGcwIQIBAQYIKwYBBQUHBwExEjAQAgEAMAMCAQEMBklzc3VlZDBC\r\nAgECBgorBgEEAYI3CgoBMTEwLwIBADADAgEBMSUwIwYJKwYBBAGCNxURMRYEFKX+\r\nPFP5+eY7IqVYhhqNGso36YkfMAAwAKCCEhgwggXkMIIDzKADAgECAhBEPCpUtZzW\r\nnUwJsYqbAutVMA0GCSqGSIb3DQEBBQUAMEYxHjAcBgNVBAoTFU1pY3Jvc29mdCBD\r\nb3Jwb3JhdGlvbjEkMCIGA1UEAxMbTWljcm9zb2Z0IENvcnBvcmF0ZSBSb290IENB\r\nMB4XDTAzMDkxOTE5MjE0MFoXDTE5MDkxOTE5Mjg0MVowRjEeMBwGA1UEChMVTWlj\r\ncm9zb2Z0IENvcnBvcmF0aW9uMSQwIgYDVQQDExtNaWNyb3NvZnQgQ29ycG9yYXRl\r\nIFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwlxxfvND/\r\nRSTgWHITf6YQcTz9M3hPStZ0N7akq7hcOBFmK3gDSw8ikTkh+2ux6ClEfN6PMy89\r\nFAmg3JFZppd5mkTgbyJk53G63w5Kj//x/3PxjFl7xr+UBR1Q5RUt8RI28/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djSAYVC81I7v/L70FaB\r\nysqM/hD0t8uzCF0PgHNHtFS2uB7TrQfGSItTGThzMu3QENpUzQBLeotvuBvg2YP5\r\nlYTQ5+7j4Q6bYw2Zo489894nfJSPy3fe10raHRsPqbGB+4SB403Mvlvc4A+OHK/I\r\n9jA8J7GBjeJKhfG3jOV/u0m+zvQ7mynttG2LRk+RHJjrVkq4uLo0ImTUue70Lzqj\r\ns2Dvd7aAJsOks4V6msQLQVGftF4WPrxMtpLnPzOK7n2MVnGxD6tXIqCDgvrbiffi\r\ne2+2JNFqiXxj/jTtmZSeDUJQpYnxVzcgoyI=\r\n",
        "Pfx":null,
        "IsExternal":false,
        "isServerGenerated":false,
        "isPfx":false,
        "isPkcs7":true,
        "isKeyHistory":false
    }
]

另请参阅