uptane / aktualizr

C++ Uptane Client
Mozilla Public License 2.0
15 stars 15 forks source link

Offline operation before provisioning #56

Closed cajun-rat closed 2 years ago

cajun-rat commented 2 years ago

This finally breaks the dependency of a network connection to allow SotaUptaneClient to start for the first time.

The approach is attempt provisioning once during SotaUptaneClient::initialize() (so the most common case is unchanged), but if it fails, allow things to continue rather than throwing an exception.

public member functions of SotaUptaneClient that need provisioning call one of requiresAlreadyProvisioned() or requiresProvision() which will attempt provisioning and throw an exception if it fails.

Draft state for discussion Now ready to go, I hope.