Help Center/ Virtual Private Network/ API Reference/ API/ P2C VPN APIs/ Server/ Verifying a Client CA Certificate
Updated on 2026-10-22 GMT+08:00

Verifying a Client CA Certificate

Function

This API is used to verify the validity of a client CA certificate.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

vpn:system:checkClientCaCertificate

Verifies the validity of CA certificates.

read

-

g:ResourceTag/<tag-key>

-

URI

POST /v5/{project_id}/p2c-vpn-gateways/vpn-servers/client-ca-certificates/check

Table 1 Parameter description

Parameter

Type

Mandatory

Description

project_id

String

Yes

Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID.

Request

Request parameters

Table 2 Request parameters

Parameter

Type

Mandatory

Description

client_ca_certificate

client_ca_certificate object

Yes

Specifies client CA certificate information.

Table 3 client_ca_certificate

Parameter

Type

Mandatory

Description

name

String

No

  • Specifies a certificate name.
  • The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), and hyphens (-).

content

String

Yes

  • Specifies the certificate content.
  • Format:

    -----BEGIN CERTIFICATE-----

    *************************************

    *************************************

    -----END CERTIFICATE-----

  • Example request
    POST /v5/{project_id}/p2c-vpn-gateways/vpn-servers/client-ca-certificates/check
    
    {
      "client_ca_certificate": {
        "name": "client_ca_8sux3d",
        "content": "-----BEGIN CERTIFICATE-----******-----END CERTIFICATE-----"
      }
    }

Response

  • Response parameters

    Returned status code 200: successful operation

    Table 4 Parameters in the response body

    Parameter

    Type

    Description

    name

    String

    • Specifies a certificate name.
    • The value is a string of 1 to 64 characters, which can contain digits, letters, underscores (_), and hyphens (-).

    issuer

    String

    • Specifies the issuer of a certificate.
    • The value is a string of 1 to 256 characters.

    subject

    String

    • Specifies the subject of a certificate.
    • The value is a string of 1 to 256 characters.

    serial_number

    String

    • Specifies the serial number of a CA certificate.
    • The value is a string of 1 to 64 characters.

    expiration_time

    String

    • Specifies the expiration time of a certificate.
    • The UTC time format is yyyy-MM-ddTHH:mm:ss.SSSZ.

    signature_algorithm

    String

    • Specifies the signature algorithm of a certificate.
    • The value is a string of 1 to 64 characters.
  • Example response
    Response returned when verification succeeds:
    {
        "name": "client_ca_8sux3d",
        "issuer": "CN=xxx",
        "subject": "CN=xxx",
        "serial_number": "621079609299744022526309164429940520767604766768",
        "expiration_time": "2033-08-05T11:52:34Z",
        "signature_algorithm": "SHA256WITHRSA"
    }

    Response returned when verification fails:

    {
        "error_code": "VPN.0072",
        "error_msg": "Certificate client_ca_8sux3d has expired.",
        "request_id": "b012532f51675c0ffdcfb2868669bd4e"
    }

Status Codes

For details, see Status Codes.