All Products
Search
Document Center

Certificate Management Service:Sign

Last Updated:Feb 27, 2025

Signs a private certificate in a certificate application repository.

Operation description

You can call the Sign operation to sign a private certificate in a certificate application repository.

Limits

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-cert:Signnone
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MessagestringYes

The data to sign. The value must be encoded in Base64.
For example, if the hexadecimal data that you want to sign is [0x31, 0x32, 0x33, 0x34], set the parameter to the Base64-encoded value MTIzNA==. If you set MessageType to RAW, the size of the data must be less than 4 KB. If the size of the data is greater than 4 KB, you can set MessageType to DIGEST and set Message to the digest of the data. The digest is a hash value. You can compute the digest of the data on an on-premises machine. The certificate application repository uses the digest that you compute in your own certificate application system. The message digest algorithm that you use must match the specified signature algorithm. The following items describe the details:

  • If the signature algorithm is SHA256withRSA, SHA256withRSA/PSS, or SHA256withECDSA, the message digest algorithm must be SHA-256.
  • If the signature algorithm is SM3withSM2, the message digest algorithm must be SM3.
message
CertIdentifierstringYes

The unique identifier of the certificate. You can call the ListCert operation to obtain the identifier.

  • If the certificate is an SSL certificate, the value of this parameter must be in the {Certificate ID}-cn-hangzhou format.
  • If the certificate is a private certificate, the value of this parameter must be the value of the Identifier field for the private certificate.
ccaf0c629c2be1e2abb63bb76b
SigningAlgorithmstringYes

The signature algorithm. Valid values:

  • SHA256withRSA
  • SHA256withRSA/PSS
  • SHA256withECDSA
  • SM3withSM2
SHA256withRSA
MessageTypestringYes

The value type of the Message parameter. Valid values:

  • RAW: the raw data. This is the default value.
  • DIGEST: the message digest (hash value) of the raw data.
RAW

Response parameters

ParameterTypeDescriptionExample
object
Signaturestring

The signature.

eyaC0w3ROK5b3QcHmUtAhMY/sQjKu2t3uBfnf6J/gn7JfZtyxwcCUjzXbw5jmqJQRbj1te670Bshg9kUdanKhtHFhJjU5jX+ZMMBr6pH0gqQDJxR0K0yHXRc0Q5OQoUZ6BfpbI4Wt4jJvJSdCstz1vSg12CfEHS8Kd5qfhItK7Y=
RequestIdstring

The ID of the request.

1ed33293-2e48-6b14-861e-538e28e408eb

Examples

Sample success responses

JSONformat

{
  "Signature": "eyaC0w3ROK5b3QcHmUtAhMY/sQjKu2t3uBfnf6J/gn7JfZtyxwcCUjzXbw5jmqJQRbj1te670Bshg9kUdanKhtHFhJjU5jX+ZMMBr6pH0gqQDJxR0K0yHXRc0Q5OQoUZ6BfpbI4Wt4jJvJSdCstz1vSg12CfEHS8Kd5qfhItK7Y=",
  "RequestId": "1ed33293-2e48-6b14-861e-538e28e408eb"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-09-20API Description UpdateView Change Details