1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-17 12:50:50 +01:00

fix: don't unwrap server keys

This commit is contained in:
Timo Kösters 2023-02-22 23:49:49 +01:00
parent 8b648d0d3f
commit bde4880c1d
No known key found for this signature in database
GPG key ID: 0B25E636FBA7E4CB

View file

@ -1529,19 +1529,20 @@ impl Service {
while let Some(result) = futures.next().await {
if let (Ok(get_keys_response), origin) = result {
if let Ok(key) = get_keys_response.server_key.deserialize() {
let result: BTreeMap<_, _> = services()
.globals
.add_signing_key(&origin, get_keys_response.server_key.deserialize().unwrap())?
.add_signing_key(&origin, key)?
.into_iter()
.map(|(k, v)| (k.to_string(), v.key))
.collect();
pub_key_map
.write()
.map_err(|_| Error::bad_database("RwLock is poisoned."))?
.insert(origin.to_string(), result);
}
}
}
info!("Search for signing keys done");