class KeyFetcher
Defined at line 42 of file ../../src/cobalt/bin/app/key_fetcher.h
Public Methods
void KeyFetcher (async_dispatcher_t *dispatcher,std::unique_ptr<lib::HTTPClient>http_client,util::DynamicEncryptedMessageMaker *shuffler_maker,util::DynamicEncryptedMessageMaker *analyzer_maker,util::SystemClockInterface *system_clock,system_data::Environmentenvironment,std::stringcache_dir,std::stringpublic_keys_url)
|dispatcher|, |http_client|, |shuffler_maker|, |analyzer_maker|, and
|system_clock| must be non-null. Unowned pointers must outlive the
KeyFetcher instance. All methods and scheduled HTTPClient::GetSync calls
execute on |dispatcher|'s thread.
Defined at line 46 of file ../../src/cobalt/bin/app/key_fetcher.cc
void KeyFetcher (async_dispatcher_t *dispatcher,std::unique_ptr<lib::HTTPClient>http_client,util::DynamicEncryptedMessageMaker *shuffler_maker,util::DynamicEncryptedMessageMaker *analyzer_maker,util::SystemClockInterface *system_clock,system_data::Environmentenvironment,std::stringcache_dir,std::stringpublic_keys_url,ScheduleOptionsschedule_options)
Defined at line 62 of file ../../src/cobalt/bin/app/key_fetcher.cc
void ~KeyFetcher ()
Defined at line 91 of file ../../src/cobalt/bin/app/key_fetcher.cc
void KeyFetcher (const KeyFetcher & )
Defined at line 91 of file ../../src/cobalt/bin/app/key_fetcher.h
KeyFetcher & operator= (const KeyFetcher & )
Defined at line 92 of file ../../src/cobalt/bin/app/key_fetcher.h
void KeyFetcher (KeyFetcher && )
Defined at line 93 of file ../../src/cobalt/bin/app/key_fetcher.h
KeyFetcher & operator= (KeyFetcher && )
Defined at line 94 of file ../../src/cobalt/bin/app/key_fetcher.h
bool LoadKeysFromDiskCache ()
Attempts to load cached public keys from
<cache
_dir>/public_keys.pb on boot.
Returns true if valid, unexpired keys were loaded into the DynamicEncryptedMessageMakers.
If the cached keyset is newer than or equal to the active keys but already expired, it is
applied to the makers (so they fail closed) and kept on disk until overwritten by a valid
network fetch before returning false.
Defined at line 100 of file ../../src/cobalt/bin/app/key_fetcher.cc
uint32_t consecutive_fetch_failures ()
Defined at line 108 of file ../../src/cobalt/bin/app/key_fetcher.h
KeyFetchStatus last_fetch_status ()
Defined at line 109 of file ../../src/cobalt/bin/app/key_fetcher.h
const std::string & cache_file_path ()
Defined at line 110 of file ../../src/cobalt/bin/app/key_fetcher.h
void OnSystemClockBecomesAccurate ()
Called after the Fuchsia system clock has synchronized with an external time source.
Schedules the initial network key fetch (immediately if active keys are uninitialized
or expired, or with uniform random jitter otherwise).
Defined at line 146 of file ../../src/cobalt/bin/app/key_fetcher.cc