mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-12-28 05:14:20 +01:00
fix: don't unwrap server keys
This commit is contained in:
parent
8b648d0d3f
commit
bde4880c1d
1 changed files with 12 additions and 11 deletions
|
@ -1529,17 +1529,18 @@ impl Service {
|
||||||
|
|
||||||
while let Some(result) = futures.next().await {
|
while let Some(result) = futures.next().await {
|
||||||
if let (Ok(get_keys_response), origin) = result {
|
if let (Ok(get_keys_response), origin) = result {
|
||||||
let result: BTreeMap<_, _> = services()
|
if let Ok(key) = get_keys_response.server_key.deserialize() {
|
||||||
.globals
|
let result: BTreeMap<_, _> = services()
|
||||||
.add_signing_key(&origin, get_keys_response.server_key.deserialize().unwrap())?
|
.globals
|
||||||
.into_iter()
|
.add_signing_key(&origin, key)?
|
||||||
.map(|(k, v)| (k.to_string(), v.key))
|
.into_iter()
|
||||||
.collect();
|
.map(|(k, v)| (k.to_string(), v.key))
|
||||||
|
.collect();
|
||||||
pub_key_map
|
pub_key_map
|
||||||
.write()
|
.write()
|
||||||
.map_err(|_| Error::bad_database("RwLock is poisoned."))?
|
.map_err(|_| Error::bad_database("RwLock is poisoned."))?
|
||||||
.insert(origin.to_string(), result);
|
.insert(origin.to_string(), result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue