导入的证书内容应仅包含 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-----"
}
}