fix a xous-ipc change but now conflated with reformatting

This commit is contained in:
bunnie 2024-09-23 14:18:45 +08:00
parent ec43c4622c
commit cdc841124d

View file

@ -10,8 +10,8 @@ use std::collections::HashSet;
use std::convert::TryInto; use std::convert::TryInto;
use std::io::{Error, ErrorKind, Result}; use std::io::{Error, ErrorKind, Result};
use aes::cipher::{generic_array::GenericArray, BlockDecrypt, BlockEncrypt}; use aes::cipher::{BlockDecrypt, BlockEncrypt, generic_array::GenericArray};
use aes::{Aes256, Block, BLOCK_SIZE}; use aes::{Aes256, BLOCK_SIZE, Block};
use aes_gcm_siv::aead::{Aead, Payload}; use aes_gcm_siv::aead::{Aead, Payload};
use aes_gcm_siv::{Aes256GcmSiv, Nonce, Tag}; use aes_gcm_siv::{Aes256GcmSiv, Nonce, Tag};
use backend::bcrypt::*; use backend::bcrypt::*;
@ -2503,16 +2503,13 @@ impl PddbOs {
let aad_local = self.data_aad(&name); let aad_local = self.data_aad(&name);
self.dna_mode = DnaMode::Migration; self.dna_mode = DnaMode::Migration;
let aad_incoming = self.data_aad(&name); let aad_incoming = self.data_aad(&name);
keymap.insert( keymap.insert(&name, MigrationCiphers {
&name, pt_ecb,
MigrationCiphers { data_gcm_siv,
pt_ecb, aad_incoming,
data_gcm_siv, aad_local,
aad_incoming, data_key: basis_keys.data.into(),
aad_local, });
data_key: basis_keys.data.into(),
},
);
modals.update_progress(index as u32 + 1).ok(); modals.update_progress(index as u32 + 1).ok();
} }
@ -2828,14 +2825,11 @@ impl PddbOs {
self.tt.sleep_ms(SWAP_DELAY_MS).unwrap(); self.tt.sleep_ms(SWAP_DELAY_MS).unwrap();
} }
// done! // done!
if self.yes_no_approval( if self.yes_no_approval(&modals, match self.dna_mode {
&modals, DnaMode::Normal => t!("pddb.freespace.finished", locales::LANG),
match self.dna_mode { DnaMode::Migration => t!("pddb.rekey.finished", locales::LANG),
DnaMode::Normal => t!("pddb.freespace.finished", locales::LANG), DnaMode::Churn => t!("pddb.churn.finished", locales::LANG),
DnaMode::Migration => t!("pddb.rekey.finished", locales::LANG), }) {
DnaMode::Churn => t!("pddb.churn.finished", locales::LANG),
},
) {
Some(ret) Some(ret)
} else { } else {
None None
@ -3457,7 +3451,7 @@ impl PddbOs {
// derive old and new keys // derive old and new keys
let basis_key_v1 = self.basis_derive_key_v00_00_01_01( let basis_key_v1 = self.basis_derive_key_v00_00_01_01(
bname.first().as_str(), bname.first().as_str(),
pw.as_str().unwrap_or("UTF8-error"), pw.as_str(),
&scd, &scd,
); );
let basis_aad_v1 = data_aad_v1(&self, bname.first().as_str()); let basis_aad_v1 = data_aad_v1(&self, bname.first().as_str());