我正在尝试将证书导入IBM-Cloud上的证书管理器服务。我总是得到这个回应
{ "code": "CRTERR400-01", "message": "There is something wrong with the content of your certificate" }
JSON的主体看起来像这样 - > { "name": "string", "data": { "content": "" } }
在内容中,我从已经通过ibm-cloud网页导入到证书管理员的证书.pem文件中输入日期。有什么建议吗?
答案 0 :(得分:1)
导入的证书内容应该只包含PEM格式字符串(从----- BEGIN CERTIFICATE -----到----- END CERTIFICATE -----,包括),其中所有换行符被\n
替换。
因此,样本体JSON看起来像这样:
{
"name":"My Certificate",
"data": {
"content":"-----BEGIN CERTIFICATE-----\nMIICqjCCAZICCQCRzXdgpbyJWzANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxu\nZXcudGVzdC5jb20wHhcNMTgwNTMxMDgxOTMzWhcNMTgwNjEwMDgxOTMzWjAXMRUw\nEwYDVQQDDAxuZXcudGVzdC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK\nAoIBAQDf10ZX0vQe7A6JacEN4LF5i4coTyPQlefu2EBmz5S1BzYFs7lRWMwR594g\nnCSWg7iFUGhITlQ+qfNdqc3LE/ViooLtUuqcWPVP3pqt2tpiRo2RegOAoXE1XlV4\n7vP3SrVDP722sBGieGINkLj9fXSbuh1OqfJD0U1yrcsPP0vhVD97AM/9MMzQh4Jr\nkkHnSAnKct7R+lzIZF1gNiEtAXjlQA/XQzdiNuVhE2yERSucKlE7iV/DYxobT92W\ndwL0z/gu5BiHZ6z+og/ryb2jjLAVoLcMF70JtE4YfdE93oCl7EIm+kag1FYZDgDt\nOtlL9W3M0rnAQqb2CJrJXC6OaMN9AgMBAAEwDQYJKoZIhvcNAQELBQADggEBANuQ\n2l8qQoteTguEDU9Dj9AOU06sTquyhbR1eXGznJJ3Gsiin9q+ZCBfh64AGwK4SQ74\n55GfVGWIrYt1AF7hijIEu6B8YXpoi5nKjXxHXZ+hGwKCAbUK5HdCUTzHVBnL6PR4\ntanqstQ03EbxKHIHQV7dGu+QvphIqRL4UwLuXL6DsLbo1HgNiL1NFW1Vph8Yqx0H\nbktUYhrOZxi0yeM8EGYNw/OsguZBDk3Q19zzmWu3gTe/R0d/+nj9EUdkyUhRveBS\n9uLxkJl7HmfY3g9LbL5xC2buMLyP/lnsuCC8k8XmwPGoMy0uujKB8EHrV4c13kdV\nGQYgv6Nvbwmka2t1Y1k=\n-----END CERTIFICATE-----"
}
}