Skip to content

Commit

Permalink
otaclient: integrate new CA cert chain store
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Oct 22, 2024
1 parent 4ce942e commit e474356
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/otaclient/app/ota_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ def __init__(
) -> None:
self.ca_chains_store = ca_chains_store

# TODO: to align with the behavior from v1.0.0, skip the OTA image verification if
# ca_chains_store is empty
self._skip_ota_image_sign_cert_verification = False
if not ca_chains_store:
self._skip_ota_image_sign_cert_verification = True

self._shutdown = False
self._update_status = api_types.UpdateStatus()
self._last_status_query_timestamp = 0
Expand Down Expand Up @@ -408,6 +414,7 @@ def _execute_update(self):
downloader=self._downloader_pool.get_instance(),
run_dir=Path(cfg.RUN_DIR),
ca_chains_store=self.ca_chains_store,
skip_cert_verification=self._skip_ota_image_sign_cert_verification,
)
self.total_files_num = otameta.total_files_num
self.total_files_size_uncompressed = otameta.total_files_size_uncompressed
Expand Down

0 comments on commit e474356

Please sign in to comment.