Перейти до вмісту

Manage CA lists

Цей контент ще не доступний вашою мовою.

A CA list holds the root certificates the switch trusts when it verifies the certificate of a TLS peer, for example a vendor that receives calls over SIP TLS. These methods do the same as System Management → SSL Management → CA Lists in the panel. They are available to the root customer.

All methods support trusted mode with i_customer; pass 1, the root customer.

The fields of a CA list, as createCAList takes them and getCAListInfo returns them:

Name Type Description
i_ca_list int ID of the CA list. Returned only
name string Name of the CA list
i_ca_list_type int 1 Uploaded: the certificates are stored on the switch; 2 Local Folder: the certificates are read from a folder on the server. The ca_list_types dictionary of getDictionary lists the values
i_ssl_use_domain_type int What the list is used for, Use Domain in the panel: 1 Web/HTTPS, 2 SIP TLS, 3 STIR/SHAKEN
ca_list string For type 1, the CA certificates in PEM format, base64-encoded. For type 2, the path of the folder on the server

Creates a CA list.

Name Type Required Description
name string yes Name of the CA list
ca_list string yes Certificates or folder, depending on the type; see the CA list structure
i_ca_list_type int no Type of the list. Default: 1 Uploaded
i_ssl_use_domain_type int no What the list is used for
Name Type Description
result string OK
i_ca_list int ID of the new CA list
request
import base64
with open("vendor-root-ca.pem", "rb") as f:
pem = base64.b64encode(f.read()).decode()
call("createCAList", {
"i_customer": 1,
"name": "Carrier X root CA",
"i_ca_list_type": 1,
"i_ssl_use_domain_type": 2,
"ca_list": pem,
})
response
{"result": "OK", "i_ca_list": 4}

Changes a CA list. Fields you do not pass keep their values.

Name Type Required Description
i_ca_list int yes ID of the CA list
name string no New name
i_ca_list_type int no New type
i_ssl_use_domain_type int no New use
ca_list string no New certificates or folder
Name Type Description
result string OK
i_ca_list int ID of the CA list
request
call("updateCAList", {"i_customer": 1, "i_ca_list": 4, "name": "Carrier X root CA 2026"})
response
{"result": "OK", "i_ca_list": 4}

Deletes a CA list.

Name Type Required Description
i_ca_list int yes ID of the CA list
Name Type Description
result string OK
i_ca_list int ID of the deleted CA list
request
call("deleteCAList", {"i_customer": 1, "i_ca_list": 4})
response
{"result": "OK", "i_ca_list": 4}

Returns one CA list.

Name Type Required Description
i_ca_list int yes ID of the CA list
Name Type Description
result string OK
ca_list struct The fields of the CA list structure
request
call("getCAListInfo", {"i_customer": 1, "i_ca_list": 4})
response
{
"result": "OK",
"ca_list": {
"i_ca_list": 4,
"name": "Carrier X root CA",
"i_ca_list_type": 1,
"i_ssl_use_domain_type": 2,
"ca_list": "LS0tLS1CRUdJTi…", # base64 of the PEM file
},
}

Returns CA lists, optionally filtered by name.

Name Type Required Description
name_pattern string no Filter by name, SQL ILIKE syntax: % matches any text, the match ignores case
limit int no Maximum number of CA lists to return
offset int no Number of CA lists to skip
Name Type Description
result string OK
ca_lists array CA lists, each a struct as getCAListInfo returns it
request
call("getCAListsList", {"i_customer": 1, "name_pattern": "%carrier%", "limit": 20, "offset": 0})
response
{
"result": "OK",
"ca_lists": [
{"i_ca_list": 4, "name": "Carrier X root CA", "i_ca_list_type": 1}, # … all fields
],
}