Retrieves the encrypted private key of a single client certificate or server-side certificate.
Operation description
This API applies only to certificates that are issued from a system-generated Certificate Signing Request (CSR). You can use this API to retrieve the encrypted private key of a client certificate or a server-side certificate. Before you call this API, you must have issued a client or server-side certificate by calling one of the following APIs:
To keep the private key secure during transmission, this API uses a password that you set to encrypt the private key. The API then returns the encrypted private key. After you retrieve the encrypted private key, you can decrypt it using one of the following methods:
If the certificate uses the RSA encryption algorithm, run the
openssl rsa -in <encrypted_private_key_file> -passin pass:<private_key_password> -out <decrypted_private_key_file>command to decrypt the private key. You must run this command on a computer that has OpenSSL or BabaSSL installed.If the certificate uses the ECC encryption algorithm, run the
openssl ec -in <encrypted_private_key_file> -passin pass:<private_key_password> -out <decrypted_private_key_file>command to decrypt the private key. You must run this command on a computer that has OpenSSL or BabaSSL installed.If the certificate uses the SM2 encryption algorithm, run the
openssl ec -in <encrypted_private_key_file> -passin pass:<private_key_password> -out <decrypted_private_key_file>command to decrypt the private key. You must run this command on a computer that has BabaSSL installed.
You can call DescribeClientCertificate to query the encryption algorithm of the client or server-side certificate.
QPS limit
This API has a queries per second (QPS) limit of 10 for each user. If you exceed this limit, your API calls are throttled. Throttling can affect your business. Plan your calls accordingly.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-cert:DescribeCertificatePrivateKey |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Identifier |
string |
Yes |
The unique identifier of the client or server-side certificate for which you want to get the private key. Note
Call ListClientCertificate to query the unique identifiers of all client and server-side certificates. |
bc37133bb7ed68c7938d928fd26d**** |
| EncryptedCode |
string |
Yes |
The password to encrypt the private key. The password can contain uppercase letters, lowercase letters, digits, and special characters, such as Warning Remember the password you set. You need this password to decrypt the encrypted private key. If you forget the password, you cannot decrypt the private key that you get from this API call. You must call this API again to get a new encrypted key.
|
!Demo@WS3ed |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the certificate belongs. |
test |
In addition to the API-specific request parameters in this topic, you must specify common request parameters when you make an API call.
For the request format, see the request example in the Examples section.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
GetCertificatePrivateKeyResponse. |
||
| EncryptedData |
string |
The encrypted content of the private key. |
-----BEGIN ENCRYPTED PRIVATE KEY----- …… -----END ENCRYPTED PRIVATE KEY----- |
| RequestId |
string |
The ID of the request. |
09470F19-CEE8-5C63-BF2C-02B5E3F07A17 |
Examples
Success response
JSON format
{
"EncryptedData": "-----BEGIN ENCRYPTED PRIVATE KEY----- …… -----END ENCRYPTED PRIVATE KEY-----",
"RequestId": "09470F19-CEE8-5C63-BF2C-02B5E3F07A17"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.