All Products
Search
Document Center

Certificate Management Service:Sign

Last Updated:Jun 25, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:SignRead
  • 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 verify is [0x31, 0x32, 0x33, 0x34], the Base64-encoded data is MTIzNA==. If the MessageType parameter is set to RAW, the size of the data to sign must be less than or equal to 4 KB. If the size of the data is greater than 4 KB, you can set the MessageType parameter to DIGEST and set the Message parameter to the digest of the data. The digest is also called hash value. You can compute the digest of the data on an on-premises machine. Certificate Management Service uses your certificate application system to compute the message digest. The message digest algorithm that is used must meet the requirements of the specified signature algorithm. The following signature algorithms require different message digest algorithms:

  • SHA256withRSA, SHA256withRSA/PSS, and SHA256withECDSA: These signature algorithms require that the message digest algorithm be SHA-256.
  • SM3withSM2: The signature algorithm requires that the message digest algorithm be SM3.
message
CertIdentifierstringYes

The unique identifier of the 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.