Add PublicRsaKeyWatchdog.

GitOrigin-RevId: b59695d96b97c6ef01a8dc0da89f07e9e250d61a
This commit is contained in:
levlam 2019-12-28 15:04:32 +03:00
parent 886d6e99c1
commit 4abc124cce

View File

@ -98,6 +98,7 @@ void PublicRsaKeyWatchdog::sync(BufferSlice cdn_config_serialized) {
return;
}
cdn_config_ = r_keys.move_as_ok();
LOG(INFO) << "Receive " << to_string(cdn_config_);
for (auto &key : keys_) {
sync_key(key);
}
@ -114,6 +115,7 @@ void PublicRsaKeyWatchdog::sync_key(std::shared_ptr<PublicRsaKeyShared> &key) {
LOG(ERROR) << r_rsa.error();
continue;
}
LOG(INFO) << "Add CDN " << key->dc_id() << " key with fingerprint " << r_rsa.ok().get_fingerprint();
key->add_rsa(r_rsa.move_as_ok());
}
}