GET – 证书属性
使用 GET 方法检索 Redfish 服务的 Certificate 资源中的属性。
请求 URL
GET https://<BMC_IPADDR>/redfish/v1/Managers/1/NetworkProtocol/HTTPS/Certificates/{id}
GET https://<BMC_IPADDR>/redfish/v1/Managers/1/KeyManagement/KMIPCertificates/{Id}
GET https://<BMC_IPADDR>/redfish/v1/AccountService/LDAP/Certificates/{id}
GET https://<BMC_IPADDR>/redfish/v1/UpdateService/RemoteServerCertificates/{id}
GET https://<BMC_IPADDR>/redfish/v1/Systems/1/VirtualMedia/{VM_id}/Certificates/{id}
请求正文
无
响应正文
字段 | 类型 | 描述 | ||
---|---|---|---|---|
Id | 字符串 | 此证书资源的索引。 | ||
Name | 字符串 | 此证书资源的名称。 | ||
Description | 字符串 | “This resource is used to represent the certificate for a Redfish implementation.” | ||
Actions | 对象 | 适用于 /redfish/v1/Managers/1/NetworkProtocol/HTTPS/Certificates/{id} | ||
#Certificate.Rekey | 对象 | 此操作为证书生成新的密钥对并产生证书签名请求。 | ||
KeyCurveId@Redfish.AllowableValues | 数组 | [“TPM_ECC_NIST_P384”]。 | ||
KeyPairAlgorithm@Redfish.AllowableValues | 数组 | [“TPM_ALG_ECDH”]。 | ||
#Certificate.Renew | 对象 | 此操作使用证书的现有信息和密钥对来生成证书签名请求。 | ||
CertificateString | 字符串 | 证书的字符串。 | ||
CertificateType | 字符串 | 证书的格式。仅支持“PEM”。 | ||
Issuer | 对象 | 证书的颁发者。 | ||
City | 字符串 | 实体组织所在的城市或地区。 | ||
CommonName | 字符串 | 实体的完全限定域名。 | ||
Country | 字符串 | 实体组织所在的国家/地区。 | ||
字符串 | 实体组织内联系人的电子邮件地址。 | |||
Organization | 字符串 | 实体组织的名称。 | ||
OrganizationalUnit | 字符串 | 实体组织所在的单位或部门名称。 | ||
State | 字符串 | 实体组织所在的州、省/自治区/直辖市或地区。 | ||
KeyUsage | 数组 | 证书中包含的密钥的用法。 | ||
KeyUsage[N] | 字符串 | “DigitalSignature”、“NonRepudiation”或“KeyEncipherment”。 | ||
Subject | 对象 | 已展开 | ||
City | 字符串 | 发出请求的组织所在的城市或地区。 | ||
CommonName | 字符串 | 实体的完全限定域名。 | ||
Country | 字符串 | 实体组织所在的国家/地区。 | ||
字符串 | 实体组织内联系人的电子邮件地址。 | |||
Organization | 字符串 | 实体组织的名称。 | ||
OrganizationalUnit | 字符串 | 实体组织所在的单位或部门名称。 | ||
State | 字符串 | 实体组织所在的州、省/自治区/直辖市或地区。 | ||
ValidNotBefore | 字符串 | 证书生效日期。 | ||
ValidNotAfter | 字符串 | 证书失效日期。 |
状态代码
HTTP 状态代码 | 错误消息 ID |
---|---|
500 | InternalError |
示例
返回以下示例 JSON 响应:
{
"ValidNotAfter": "2029-12-17T01:51:18+00:00",
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol/HTTPS/Certificates/1",
"KeyUsage": [
"DigitalSignature",
"NonRepudiation",
"KeyEncipherment"
],
"Id": "1",
"Name": "Certificate_HTTPS",
"CertificateType": "PEM",
"@odata.etag": "\"eed23a10000d2d28c9cbd\"",
"Subject": {
"Organization": "Lenovo",
"Country": "US",
"City": "RTP",
"CommonName": "XCC-7Z60-SN",
"State": "NC"
},
"@odata.type": "#Certificate.v1_1_1.Certificate",
"ValidNotBefore": "2019-12-20T01:51:18+00:00",
"Issuer": {
"Organization": "Lenovo",
"Country": "US",
"City": "RTP",
"CommonName": "XCC-7Z60-SN",
"State": "NC"
},
"CertificateString": "-----BEGIN CERTIFICATE-----\nMIIClTCCAhqgAwIBAgIUfjeBVwa2nDdgtHJxWPn1pn/ZabcwCgYIKoZIzj0EAwIwTzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5DMQwwCgYDVQQHDANSVFAxDzANBgNVBAoMBkxlbm92bzEUMBIGA1UEAwwLWENDLTdaNjAtU04wHhcNMTkxMjIwMDE1MTE4WhcNMjkxMjE3MDE1MTE4WjBPMQswCQYDVQQGEwJVUzELMAkGA1UECAwCTkMxDDAKBgNVBAcMA1JUUDEPMA0GA1UECgwGTGVub3ZvMRQwEgYDVQQDDAtYQ0MtN1o2MC1TTjB2MBAGByqGSM49AgEGBSuBBAAiA2IABAoScPNA/aeC9MR9j+8wdKVW9F/+LoaNrXH4OvIB4bN7sWMBdcm8/1oF2yknMR87OTf9rtbdb5Wlbf9h+86N96vAYv0hJ1nUD9LtosCtppp/7ULDnNfSpNRfXoZ1uSnP4aOBtjCBszAJBgNVHRMEAjAAMAsGA1UdDwQEAwIF4DCBmAYDVR0RBIGQMIGNggtYQ0MtN1o2MC1TTocQ/oAAAAAAAAAKlO///q9On4IpZmU4MC0tYTk0LWVmZmYtZmVhZi00ZTlmLmlwdjYtbGl0ZXJhbC5uZXSHEP6AAAAAAAAACpTv//6vTqCCKWZlODAtLWE5NC1lZmZmLWZlYWYtNGVhMC5pcHY2LWxpdGVyYWwubmV0hwSp/l92MAoGCCqGSM49BAMCA2kAMGYCMQCJI5XXdOr2LvwkEgcpKp/kOlk0Ynq2Bag/E8dVFUF4JwnOHrVUY5pZTqFEUq9rX6ECMQC06e3av/Tw2EWplx5Q+5pJmiLaoP5V8a+WGXHhqAcqY/0MyrB4oAlaoc0QRQGZXdM=\n-----END CERTIFICATE-----",
"Actions": {
"#Certificate.Rekey": {
"title": "Generate a new key pair for an existing certificate and produce a CSR.",
"KeyCurveId@Redfish.AllowableValues": [
"TPM_ECC_NIST_P384"
],
"KeyPairAlgorithm@Redfish.AllowableValues": [
"TPM_ALG_ECDH"
],
"target": "/redfish/v1/Managers/1/NetworkProtocol/HTTPS/Certificates/1/Actions/Certificate.Rekey"
},
"#Certificate.Renew": {
"title": "Generate a CSR using the existing information and key pair of the certificate.",
"target": "/redfish/v1/Managers/1/NetworkProtocol/HTTPS/Certificates/1/Actions/Certificate.Renew"
}
},
"Description": "This resource is used to represent the certificate for a Redfish implementation."
}