Currently, most software upgrade solutions are not securely protected. Therefore, devices are exposed to various security threats during the upgrade procedure. Apollo secure upgrade SDK provides secure upgrade capabilities, and can be easily integrated to make the upgrade process more secure and robust.
A typical upgrade procedure is shown below:
After integrating secure upgrade SDK, the upgrade procedure is modified as follows:
SDK contains four directories:
This function should be called before using secure upgrade APIs.
init_secure_upgrade(root_config_path)
input para:
root_config_path root configuration file path
This function is used to generate the device token.
sec_upgrade_get_device_token()
Output para:
return code: true generating device token successfully
false generating device token failed
Device_token: device token (string format)
This function is used to generate the secure upgrade package and package token.
sec_upgrade_get_package(original_package_path,
secure_package_path,
package_token_path)
input para:
original_package_path original upgrade package file path
secure_package_path secure upgrade package file path
package_token_path secure package token file
output para:
return code:
true generating secure upgrade package successfully
false generating secure upgrade package failed
This function is used to generate a device’s authorization token, based on device token and package token.
sec_upgrade_get_authorization_token(package_token_path,
device_token_path)
input para:
package_token_path secure package token file path
device_token_path device token file path
output_para:
return code:
true generating authorization token successfully
false generating authorization token failed
authorization_token authorization token buffer(string formate)
This function is used to verify the downloaded secure package with the authorization token and generate the original package.
sec_upgrade_verify_package(authorization_token_buffer,
secure_package_path)
input para:
authorization_token_buffer authorization token buffer(string format)
secure_package_path secure upgrade package file path
output para:
original_package_path original upgrade package file path
config
directory and the read permission of the certificate
directory.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。