关于长安链管理平台导入ca服务生成证书的问题
【问题分类】
- 长安链管理台
【问题描述】(请对问题进行描述,方便定位问题)
我使用了基于ca服务生成的组织证书,在获取组织的CA证书的时候,返回的数据没有包含ca私钥
curl --location --request POST 'http://localhost:8096/api/ca/querycerts' --header 'Content-Type: application/json'
--data '{
"orgId": "wx-org1.chainmaker.org",
"userType": "ca",
"certUsage": "sign"
}' | jq
{ "code": 200, "msg": "The request service returned successfully", "data": [ { "userId": "ca-wx-org1.chainmaker.org", "orgId": "wx-org1.chainmaker.org", "userType": "ca", "certUsage": "sign", "certSn": 1143755128660336400, "issuerSn": 2888000954800518700, "certContent": "-----BEGIN CERTIFICATE-----\nMIICaTCCAg6gAwIBAgIID99vOsnUntEwCgYIKoZIzj0EAwIwYjELMAkGA1UEBhMC\nQ04xEDAOBgNVBAgTB0JlaWppbmcxEDAOBgNVBAcTB0JlaWppbmcxETAPBgNVBAoT\nCG9yZy1yb290MQ0wCwYDVQQLEwRyb290MQ0wCwYDVQQDEwRyb290MB4XDTI0MDkx\nMjAzMjE1M1oXDTI1MDMxMTAzMjE1M1owgYMxCzAJBgNVBAYTAkNOMRAwDgYDVQQI\nEwdCZWlqaW5nMRAwDgYDVQQHEwdCZWlqaW5nMR8wHQYDVQQKExZ3eC1vcmcxLmNo\nYWlubWFrZXIub3JnMQswCQYDVQQLEwJjYTEiMCAGA1UEAxMZY2Etd3gtb3JnMS5j\naGFpbm1ha2VyLm9yZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMNsfK2pTGm4\npwq9i1gEQJ8Ptq021SIpwQMMriC+23mC6P92VrdQmuMbtZkvm/+vm+41yDjCe6NN\nhTgDAfIPdsejgYswgYgwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w\nKQYDVR0OBCIEIA7+KB7GXOvMFNJdbwYyE+EmEoNDlZ+hQfRVo+nEIC4hMCsGA1Ud\nIwQkMCKAICqEWfAJK/VwyAlK19j1EV8Yfhl3ylLwUI2Nn+Icc58BMA0GA1UdEQQG\nMASCAIIAMAoGCCqGSM49BAMCA0kAMEYCIQCw2wFM0n85UMZuxsfmkm1yk70oOYWp\nmf8dkzI2fVL8fQIhAKp3LhGJFrosEWGdCvjFEmfZCkUTqTUaPicADKoYQTfx\n-----END CERTIFICATE-----\n", "expirationDate": 1741663313, "isRevoked": false } ] }
而长安链管理平台导入组织证书的时候需要提供对应的组织ca私钥,这个数据在哪里获取?
另外我在ca服务的数据库中也没有找到
INSERT INTO chainmaker_ca
.cert_content
(id
, created_at
, updated_at
, serial_number
, content
, signature
, country
, locality
, province
, organization
, organizational_unit
, common_name
, ski
, aki
, key_usage
, ext_key_usage
, csr_content
, is_ca
, issue_date
, expiration_date
) VALUES (19, 1726111913, 1726111913, 1143755128660336337, '-----BEGIN CERTIFICATE-----\nMIICaTCCAg6gAwIBAgIID99vOsnUntEwCgYIKoZIzj0EAwIwYjELMAkGA1UEBhMC\nQ04xEDAOBgNVBAgTB0JlaWppbmcxEDAOBgNVBAcTB0JlaWppbmcxETAPBgNVBAoT\nCG9yZy1yb290MQ0wCwYDVQQLEwRyb290MQ0wCwYDVQQDEwRyb290MB4XDTI0MDkx\nMjAzMjE1M1oXDTI1MDMxMTAzMjE1M1owgYMxCzAJBgNVBAYTAkNOMRAwDgYDVQQI\nEwdCZWlqaW5nMRAwDgYDVQQHEwdCZWlqaW5nMR8wHQYDVQQKExZ3eC1vcmcxLmNo\nYWlubWFrZXIub3JnMQswCQYDVQQLEwJjYTEiMCAGA1UEAxMZY2Etd3gtb3JnMS5j\naGFpbm1ha2VyLm9yZzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMNsfK2pTGm4\npwq9i1gEQJ8Ptq021SIpwQMMriC+23mC6P92VrdQmuMbtZkvm/+vm+41yDjCe6NN\nhTgDAfIPdsejgYswgYgwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w\nKQYDVR0OBCIEIA7+KB7GXOvMFNJdbwYyE+EmEoNDlZ+hQfRVo+nEIC4hMCsGA1Ud\nIwQkMCKAICqEWfAJK/VwyAlK19j1EV8Yfhl3ylLwUI2Nn+Icc58BMA0GA1UdEQQG\nMASCAIIAMAoGCCqGSM49BAMCA0kAMEYCIQCw2wFM0n85UMZuxsfmkm1yk70oOYWp\nmf8dkzI2fVL8fQIhAKp3LhGJFrosEWGdCvjFEmfZCkUTqTUaPicADKoYQTfx\n-----END CERTIFICATE-----\n', '3046022100fdf671374e92a64bbfc6959505aaa199f4132544b82f42aed024c99fbfd51d7e022100cb8540754681d8678fdc8bbb705a416b8eac4608dce4cf754f2fa0cf1a1d2b16', 'CN', 'Beijing', 'Beijing', 'wx-org1.chainmaker.org', 'ca', 'ca-wx-org1.chainmaker.org', '0efe281ec65cebcc14d25d6f063213e126128343959fa141f455a3e9c4202e21', '2a8459f0092bf570c8094ad7d8f5115f187e1977ca52f0508d8d9fe21c739f01', 96, 'null', '-----BEGIN CERTIFICATE REQUEST-----\nMIIBQDCB5gIBADCBgzELMAkGA1UEBhMCQ04xEDAOBgNVBAgTB0JlaWppbmcxEDAO\nBgNVBAcTB0JlaWppbmcxHzAdBgNVBAoTFnd4LW9yZzEuY2hhaW5tYWtlci5vcmcx\nCzAJBgNVBAsTAmNhMSIwIAYDVQQDExljYS13eC1vcmcxLmNoYWlubWFrZXIub3Jn\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEw2x8ralMabinCr2LWARAnw+2rTbV\nIinBAwyuIL7beYLo/3ZWt1Ca4xu1mS+b/6+b7jXIOMJ7o02FOAMB8g92x6AAMAoG\nCCqGSM49BAMCA0kAMEYCIQD99nE3TpKmS7/GlZUFqqGZ9BMlRLgvQq7QJMmfv9Ud\nfgIhAMuFQHVGgdhnj9yLu3BaQWuOrEYI3OTPdU8voM8aHSsW\n-----END CERTIFICATE REQUEST-----\n', 1, 1726111313, 1741663313);
这里的指南为保存为ca.key,但实际执行保存的是ca.crt
具体的现象,操作步骤,前置条件等,尽可能描述清楚,有截图说明更佳
相关版本
chainmaker-ca:v2.2.0
chainmakerofficial/management-web:v2.3.4
chainmakerofficial/management-backend:v2.3.4