crypto: Pass a String when setting the other SAS pubkey.

master
Damir Jelić 2020-08-10 10:18:57 +02:00
parent 3ddb2199d2
commit 81e9a7cefc
1 changed files with 2 additions and 8 deletions

View File

@ -440,13 +440,10 @@ impl SasState<Started> {
let their_pubkey = mem::take(&mut event.content.key); let their_pubkey = mem::take(&mut event.content.key);
// The SAS object clears the public key, so we make a copy.
let pubkey_copy = their_pubkey.clone();
self.inner self.inner
.lock() .lock()
.unwrap() .unwrap()
.set_their_public_key(&pubkey_copy) .set_their_public_key(their_pubkey.clone())
.expect("Can't set public key"); .expect("Can't set public key");
Ok(SasState { Ok(SasState {
@ -489,13 +486,10 @@ impl SasState<Accepted> {
} else { } else {
let their_pubkey = mem::take(&mut event.content.key); let their_pubkey = mem::take(&mut event.content.key);
// The SAS object clears the public key, so we make a copy.
let pubkey_copy = their_pubkey.clone();
self.inner self.inner
.lock() .lock()
.unwrap() .unwrap()
.set_their_public_key(&pubkey_copy) .set_their_public_key(their_pubkey.clone())
.expect("Can't set public key"); .expect("Can't set public key");
Ok(SasState { Ok(SasState {