Functions
The following functions are available globally.
-
This API is used to authenticate the device by interacting with API Gateway server and get the Model & Instance ID. This wrapper API will take care of DAC Initialization, opening the DAC session (& does the provisioning also if needed), get the challenge from CCL library and interact with API Gateway server for authentication. This API is deprecated since 5.1.0 release.
Declaration
Objective-C
_Bool doAuthenticate(const char *pxopvault, const char *pxdas_url, const char *pxpvs_url, const char *pxtoken, uint8_t **pxoutModelId, uint8_t **pxoutInstanceId)Parameters
pxopvaultOperator vault data. Application will fetch the operator vault data and pass to this API
pxdas_urlDAS server URL
pxpvs_urlPVS server URL
pxtokenToken of tenant
pxoutModelId[out] Model ID
pxoutInstanceId[out] Instance ID
Return Value
bool true if device authentication is success, false otherwise.
-
This API is used for secure key exchange with DAS server to get the DAS license containing the protected session keys and install it using CCL library in DAS client. This API is deprecated since 5.1.0 release.
Declaration
Objective-C
_Bool doSecureKeyExchange(const char *pxSessionKeyList, _Bool isPersisted)Parameters
pxSessionKeyListsession key list for API Gateway.
isPersistedflag to indicate if data is persisted or not
Return Value
bool true if Das License Acquired & Session Keys were installed successfully, false otherwise.
-
This API is used to encrypt/decrypt the given input data. This API is deprecated since 5.1.0 release.
Declaration
Objective-C
_Bool doEncryptDecrypt(const char *pxKeyIdentifier, const char *pxInitializationVector, _Bool xEncrypt, const char *pxInData, char *pxOutData)Parameters
pxKeyIdentifierKey ID to use for encryption.
pxInitializationVectorInitialization Vector (IV) used for encrypt/decrypt operation.
xEncryptFlag to indicate encrypt (true) or decrypt (false) operation
pxInDataInput data to encrypt or decrypt
pxOutData[out] Encrypted or decrypted data
Return Value
bool true if data could encrypted/decrypted successfully, false otherwise.
-
This API is used to sign the given input data. This API is deprecated since 5.1.0 release.
Declaration
Objective-C
_Bool doSign(const char *pxKeyIdentifier, const char *pxInData, char *pxSignature)Parameters
pxKeyIdentifierKey ID to use for signing the data.
pxInDataInput data to sign
pxSignature[out] Signed output data
Return Value
bool true if data could be signed successfully, false otherwise.
-
This API is used to verify the given input and signed data. This API is deprecated since 5.1.0 release.
Declaration
Objective-C
_Bool doVerify(const char *pxKeyIdentifier, const char *pxInData, const char *pxsignature, _Bool *pxResult)Parameters
pxKeyIdentifierKey ID to use for signing the data.
pxInDataInitial Input buffer data which was used for signing.
pxsignatureSigned output data
pxResult[out] Indicates if verify API call inside DAC was success or not.
Return Value
bool true if verification is completed, false otherwise.
-
This API is used to get the status message of previous API calls.
Declaration
Objective-C
_Bool getStatusMessage(char **statusMessage)Parameters
statusMessage[out] Status message of previous operation.
Return Value
bool true if status message could be retrieved successfully, false otherwise.
-
This API is used to close & terminate the DAC session if any, to free up the resources allocated. This API is deprecated since 5.1.0 release.
Declaration
Objective-C
void terminate() -
This API is used to set the provisioining server (PVS) URL. If PVS url is not set, default PVS url is used for device provisioning, if device is not provisioned.
Declaration
Objective-C
_Bool das_set_provisioning_server_url(const char *pxpvs_url)Parameters
pxpvs_urlPVS server URL
Return Value
bool true if PVS url could be set, false otherwise.
-
This API is used to initialize and open the DAC session. It also does the provisioning, if needed, using PVS url.
Declaration
Objective-C
_Bool das_session_open(const char *pxopvault)Parameters
pxopvaultOperator vault data. Application will fetch the operator vault data and pass to this API
Return Value
bool true if session open is success, false otherwise.
-
This API is used to get the challenge data from CCL library.
Declaration
Objective-C
_Bool das_session_get_device_auth_data(char **ppChallenge)Parameters
ppChallenge[out] Base64 encoded challenge data
Return Value
bool true if getting the challenge data is success, false otherwise.
-
This API is used to install DAS license data containing the protected session keys using CCL library in DAS client.
Declaration
Objective-C
_Bool das_session_import_license(const char *pResponseData)Parameters
pResponseDataDAS license data to install
Return Value
bool true if Das License data was installed successfully, false otherwise.
-
This API is used to encrypt/decrypt the given input data.
Declaration
Objective-C
_Bool das_session_encrypt_decrypt_data(const char *pxKeyIdentifier, const char *pxInitializationVector, _Bool xEncrypt, const char *pxInData, char *pxOutData)Parameters
pxKeyIdentifierKey ID to use for encryption.
pxInitializationVectorInitialization Vector (IV) used for encrypt/decrypt operation.
xEncryptFlag to indicate encrypt (true) or decrypt (false) operation
pxInDataInput data to encrypt or decrypt
pxOutData[out] Encrypted or decrypted data
Return Value
bool true if data could be encrypted/decrypted successfully, false otherwise.
-
This API is used to sign the given input data.
Declaration
Objective-C
_Bool das_session_sign_data(const char *pxKeyIdentifier, const char *pxInData, char *pxSignature)Parameters
pxKeyIdentifierKey ID to use for signing the data.
pxInDataBase64 encoded Input data to sign
pxSignature[out] Base64 encoded Signature data
Return Value
bool true if data could be signed successfully, false otherwise.
-
This API is used to verify the given input and signed data.
Declaration
Objective-C
_Bool das_session_verify_data(const char *pxKeyIdentifier, const char *pxInData, const char *pxsignature, _Bool *pxResult)Parameters
pxKeyIdentifierKey ID to use for signing the data.
pxInDataInitial Input buffer data which was used for signing. This input data is encoded in base64 format.
pxsignatureBase64 encoded Signature data
pxResult[out] Indicates if verify API call inside DAC was success or not.
Return Value
bool true if verification is completed, false otherwise.
-
This API is used to close & terminate the DAC session if any, to free up the resources allocated.
Declaration
Objective-C
void das_session_close(_Bool isTerminate)Parameters
isTerminateflag to indicate whether to terminate the DAC session & free up the resources.
Functions Reference