crypto: Clear out the signatures when signing a device.

This avoids re-uploading all the existing signatures.
master
Damir Jelić 2020-10-29 15:37:29 +01:00
parent 5c530cf9ee
commit cb95f576a5
1 changed files with 2 additions and 2 deletions

View File

@ -122,12 +122,12 @@ impl PrivateCrossSigningIdentity {
}
/// Sign the given device keys with this identity.
#[allow(dead_code)]
pub(crate) async fn sign_device(
&self,
device: &ReadOnlyDevice,
) -> Result<SignatureUploadRequest, SignatureError> {
let device_keys = device.as_device_keys();
let mut device_keys = device.as_device_keys();
device_keys.signatures.clear();
self.sign_device_keys(device_keys).await
}