Setting Certificate Verification Information
Function
This API is used to set certificate verification information.
Function Prototype
setCAVerifyInfo(CAVerifyInfo: CAVerifyInfo, onSetCAVerifyInfoResult?: (ret: SDKERR, reason: string) => void): voidsetCAVerifyInfo(CAVerifyInfo: CAVerifyInfo, onSetCAVerifyInfoResult?: (ret: SDKERR, reason: string) => void): void
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
CAVerifyInfo | Yes | CAVerifyInfo | Certificate verification information. |
onSetCAVerifyInfoResult | Yes | (ret: SDKERR, reason: string) => void | Callback of the certificate verification information. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
verifyMode | Yes | VerifyMode | Verification mode. |
certPath | No | string | User-defined path for storing the certificate. If this parameter is left empty, the built-in certificate is used for verification. |
Enumeration Name | Enumerated Value | Description |
---|---|---|
VERIFY_MODE_NONE | 0 | No verification. |
VERIFY_MODE_SERVER | 1 | Verify the server certificate. |
Return Values
void
Callback Method Parameters
(ret: SDKERR, reason: string) => void
Parameter | Type | Description |
---|---|---|
ret | For details about SDKERR, see Error Code Reference. | Error code. |
reason | string | Error description. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot