All Products
Search
Document Center

Certificate Management Service:CreateSubCACertificate

Last Updated:Jul 08, 2024

Creates an intermediate certificate authority (CA) certificate.

Operation description

You can call this operation to issue an intermediate certificate authority (CA) certificate by using an existing root CA certificate. Intermediate CA certificates can be used to issue client certificates and server certificates.

Before you call this operation, make sure that you have issued a root CA certificate by calling the [CreateRootCACertificate] operation.

Limits

You can call this operation up to 10 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

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
ParentIdentifierstringYes

The unique identifier of the root CA certificate.

Note You can call the [DescribeCACertificateList] operation to query the unique identifiers of all CA certificates.
1a83bcbb89e562885e40aa0108f5****
CommonNamestringYes

The common name or abbreviation of the organization. The value can contain letters.

Aliyun
OrganizationUnitstringYes

The name of the department or branch in the organization. The value can contain letters.

Security
OrganizationstringYes

The name of the organization that is associated with the intermediate CA certificate. You can enter the name of your enterprise or company. The value can contain letters.

Maizi Technology
LocalitystringYes

The name of the city in which the organization is located. The value can contain letters.

Hangzhou
StatestringYes

The name of the province or state in which the organization is located. The value can contain letters.

Zhejiang
CountryCodestringNo

The code of the country or region in which the organization is located. You can enter an alpha-2 or alpha-3 code. For example, you can use CN to indicate China and use US to indicate the United States.

For more information about country codes, see the "Country codes" section in Manage company profiles.

CN
AlgorithmstringYes

The type of the key algorithm of the intermediate CA. The key algorithm is in the <Encryption algorithm>_<Key length> format. Valid values:

  • RSA_1024: The signature algorithm is Sha256WithRSA.
  • RSA_2048: The signature algorithm is Sha256WithRSA.
  • RSA_4096: The signature algorithm is Sha256WithRSA.
  • ECC_256: The signature algorithm is Sha256WithECDSA.
  • SM2_256: The signature algorithm is SM3WithSM2.

The encryption algorithm of an intermediate CA certificate must be consistent with the encryption algorithm of a root CA certificate. The length of the keys can be different. For example, if the key algorithm of the root CA certificate is RSA_2048, the key algorithm of the intermediate CA certificate must be RSA_1024, RSA_2048, or RSA_4096.

Note You can call the DescribeCACertificate operation to query the key algorithm of a root CA certificate.
RSA_2048
YearsintegerYes

The validity period of the intermediate CA certificate. Unit: years.

We recommend that you set this parameter to 5 to 10.

Note The validity period of the intermediate CA certificate cannot exceed the validity period of the root CA certificate. You can call the [DescribeCACertificate]operation to query the validity period of a root CA certificate.
5
PathLenConstraintintegerNo

The path length constraint of the certificate. Default value: 0.

0
ExtendedKeyUsagesarrayNo

The extended key usages of the certificate.

stringNo

The extended key usage of the certificate. Valid values:

  • any
  • serverAuth
  • clientAuth
  • codeSigning
  • emailProtection
  • timeStamping
  • OCSPSigning
  • object identifier of other extended key usage
serverAuth
EnableCrlbooleanNo

Enable Crl Service.

  • 0- No
  • 1- Yes
1
CrlDayintegerNo

CRL validity period: 1-365 days

30

The object.

Response parameters

ParameterTypeDescriptionExample
object

The object.

RequestIdstring

The ID of this call request is a unique identifier generated by Alibaba Cloud for the request, which can be used for troubleshooting and locating issues.

15C66C7B-671A-4297-9187-2C4477247A74
Identifierstring

The unique identifier of the sub CA certificate created in this request.

160ae6bb538d538c70c01f81dcf2****
Certificatestring

The CA certificate in the PEM format.

-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----
CertificateChainstring

The certificate chain of the CA certificate.

-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\n......\n-----END CERTIFICATE-----\n
  • serverAuth
  • clientAuth
  • codeSigning
  • emailProtection
  • timeStamping
  • OCSPSigning
  • object identifier of other extended key usage

Examples

Sample success responses

JSONformat

{
  "RequestId": "15C66C7B-671A-4297-9187-2C4477247A74",
  "Identifier": "160ae6bb538d538c70c01f81dcf2****",
  "Certificate": "-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----",
  "CertificateChain": "-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n-----BEGIN CERTIFICATE-----\\n......\\n-----END CERTIFICATE-----\\n"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-09-05API Description Update. The request parameters of the API has changedView Change Details
2023-03-23The request parameters of the API has changed. The response structure of the API has changedView Change Details