SecretStore: implemented restore_server_key
This commit is contained in:
parent
a2c12ab13e
commit
5d6abfe2f5
@ -351,8 +351,11 @@ impl ServiceContractListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Restore server key.
|
/// Restore server key.
|
||||||
fn restore_server_key(_data: &Arc<ServiceContractListenerData>, _server_key_id: &ServerKeyId) -> Result<Public, String> {
|
fn restore_server_key(data: &Arc<ServiceContractListenerData>, server_key_id: &ServerKeyId) -> Result<Public, String> {
|
||||||
unimplemented!() // TODO
|
data.params.key_storage.get(server_key_id)
|
||||||
|
.map_err(|e| format!("{}", e))
|
||||||
|
.and_then(|ks| ks.ok_or("missing key".to_owned()))
|
||||||
|
.map(|ks| ks.public)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Publish server key.
|
/// Publish server key.
|
||||||
|
Loading…
Reference in New Issue
Block a user