All Products
Search
Document Center

Certificate Management Service:Verify

Last Updated:Aug 02, 2024

Verifies the signature of a private certificate in a certificate application repository.

Operation description

You can call the Verify operation to verify the signature of 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:Verifyget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MessagestringYes

The data for which you want to verify the signature. The value must be encoded in Base64.
For example, if the hexadecimal data that you want to verify 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 also called hash value. You can compute the digest of the data on an on-premises machine. The certificate repository 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:

  • 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.
MTIzNA==
CertIdentifierstringYes

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

  • 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.
5870821-cn-hangzhou
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 of the raw data.
RAW
SignatureValuestringYes

The signature value. The value must be encoded in Base64.

eyaC0w3ROK5b3QcHmUtAhMY/sQjKu2t3uBfnf6J/gn7JfZtyxwcCUjzXbw5jmqJQRbj1te670Bshg9kUdanKhtHFhJjU5jX+ZMMBr6pH0gqQDJxR0K0yHXRc0Q5OQoUZ6BfpbI4Wt4jJvJSdCstz1vSg12CfEHS8Kd5qfhItK7Y=

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

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

Indicates whether the signature is valid. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "1ed33293-2e48-6b14-861e-538e28e408eb",
  "SignatureValid": true
}

Error codes

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