导入SSL证书

1.接口描述

接口说明:导入SSL证书。

请求方式:POST [ip]/api/certificate/import

管理员权限 登录认证

2.输入参数

参数名称 必选 类型 描述
certificate String 根证书
private-key String 根证书私钥

3.输出参数

参数名称 类型 描述
status Int 状态码
code String 状态描述

4.示例

导入SSL证书

输入示例
{
    "certificate": "-----BEGIN CERTIFICATE-----\nMIIC1DCCAbwCCQDBG1CCTFOyfDANBgkqhkiG9w0BAQsFADBXMQswCQYDVQQGEwJD\nTjESMBAGA1UECAwJR3VhbmdEb25nMREwDwYDVQQHDAhTaGVuWmhlbjEhMB8GA1UE\nCgwYQm9saW4gVGVjaG5vbG9neSBSb290IENBMCAXDTIyMTEyMjAyMDYyNVoYDzMw\nMjIwMzI1MDIwNjI1WjCBgjELMAkGA1UEBhMCQ04xEjAQBgNVBAgMCUd1YW5nRG9u\nZzERMA8GA1UEBwwIU2hlblpoZW4xFTATBgNVBAoMDGJvbGluLWF2LmNvbTEVMBMG\nA1UEAwwMYm9saW4tYXYuY29tMR4wHAYJKoZIhvcNAQkBFg9hdkBib2xpbi1hdi5j\nb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALoeOv9z+IDzvCGfPWcU7bLP\nSkuPsHLN9VxQWJA692ke7rTK5qrLcUhrbLIAHhTLW5ET1S+NtmbIe2VGWkoSBJdj\nkNM61C3pFZe8q1EdbKnAt+Pa1PdYRCBnIQJAZgXrSh3L+YcfhexBKUeydkjuSLA9\nKvnoufkV9TS+yZ1NbtPXAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAEsWsAbM8fFb\nvDtdkkE3pmjeZq1xUVBdNHgryVFzOl9UiC7eV48SGhLyLZ5AQF6htIJ0Z70pn+2G\nMoGZCu7CRmP/tvFHxUmFE4GRxHJYyxXlej3t2ju+5qiI0o3iGAaeobk6+OR5l9D0\nL+UvLrhb0wbE53oZwMgGuH0cN08zAmh56ySGdJtmlrXVZugtEgOFvOORVFwUpERA\nXLG6HyyFYaZf4yBYFGk6N804QF8JBsx68vavH41LODCY9kFUagVUSzTGvrLx2p0R\nroxsbYJfimRtRs3xLifZaC+pXke1jiKIfq8qyxzzybRFf4KsdmhaWebgeXmb2H9M\n7VzaytYC1/k=\n-----END CERTIFICATE-----\n",
    "private-key": "-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQC6Hjr/c/iA87whnz1nFO2yz0pLj7ByzfVcUFiQOvdpHu60yuaq\ny3FIa2yyAB4Uy1uRE9UvjbZmyHtlRlpKEgSXY5DTOtQt6RWXvKtRHWypwLfj2tT3\nWEQgZyECQGYF60ody/mHH4XsQSlHsnZI7kiwPSr56Ln5FfU0vsmdTW7T1wIDAQAB\nAoGBAKzN/rdKRPPt2cJZ6Jf6DYzU/EVV/11Ir0Rr8R7RMQAwUTAZp7vyspar7zsB\n8uwZuEXmZS0G5dFe2Xs5rAFT41/aVFEb+TYxpdDUx+k3GpveXUhBx04qMYtWw4za\njzuKZSS2C6MdtOgayxSis+inrfRwPhV8mceia8yT6XiAD7OJAkEA6Hpz1MFs2Ujx\nYj8X05eHT+jmxARLCXKy/h6YmE5zPavPU5nCsvpglEj3N7oVy9mMxHyhR6iF+Cpb\nKCKAjCGeewJBAMzy+eZ9kpcdDOU62DrPQvDecWqJ+gL28taUndMbAFjgGOZjpDES\nq9LCvZi75CBQvL/InMx42PMCGRrWKcc0D1UCQQDkLdRk/ZjdyDeMK8syFmdsaned\n62zPEDJZNCSoUU/RN0JeluvACfojcV6c5tuf4p7E+GLAV8tuofwo73xmjlTjAkAZ\nA8MKpeMBfLM5O1BvBSMXgR74sPSJ7hg/po4I2S/WqSuA20KMFspQBCLeBHjYlOIk\nyliRAGMCbgwgYWlh/fGtAkAcJf8uHBMHsb+GzOSrQHs0chOt/cu7kRUVno5bvsVC\nX52nDmaC/QTfb9mFodkv3VvBHNOvG3vS/15YKWD8b5Pw\n-----END RSA PRIVATE KEY-----\n"
}
输出示例
{
    "status": 0,
    "code": "Success"
}

5.错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 定义 说明
7 MW_STATUS_INVALID_ARG 参数缺失
15 MW_STATUS_WRITE_FAILED IO 写入失败
40 MW_STATUS_VERIFY_FAILED 验证失败

与“”相关结果约

    找不到与“”相关的结果