Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_CreateCert

### Interface Definition

C++C#

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    BOOL NET_SDK_CreateCert(
        LONG lUserID,
        const char* countryName,
        const char* commonName,
        const char* stateOrProvinceName,
        const char* localityName,
        const char* organizationName,
        const char* organizationalUnitName,
        const char* email,
        int validityPeriod,
        const char* password);

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    public static extern Boolean NET_SDK_CreateCert(
        Int32 lUserID,
        string countryName,
        string commonName,
        string stateOrProvinceName,
        string localityName,
        string organizationName,
        string organizationalUnitName,
        string email,
        Int32 validityPeriod,
        string password);

### Function Description

Create a certificate interface to generate a digital certificate for the device.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, return value of `NET_SDK_Login`.
countryNamein | char* | Country name (such as "CN").
commonNamein | char* | Common name (such as IP address).
stateOrProvinceNamein | char* | State/province name.
localityNamein | char* | Region name.
organizationNamein | char* | Organization name.
organizationalUnitNamein | char* | Organizational unit name.
emailin | char* | Email address.
validityPeriodin | int | Validity period (unit: days).
passwordin | char* | Certificate password (clear text, internal MD5 encryption).

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

None

Error Code