[Fix] Harden MTP codec, transport, and SDK security
This commit is contained in:
parent
188caf56cc
commit
a7e804c603
73 changed files with 11892 additions and 5756 deletions
|
|
@ -111,8 +111,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}) as Pin<Box<dyn Future<Output = u64> + Send>>
|
||||
};
|
||||
|
||||
let decrypt_keyring_bytes = host_keyring.try_to_bytes()?;
|
||||
let decrypt_keyring = Arc::new(
|
||||
match mtp::crypto::Keyring::from_bytes(&host_keyring.to_bytes()) {
|
||||
match mtp::crypto::Keyring::from_bytes(&decrypt_keyring_bytes) {
|
||||
Ok(keyring) => keyring,
|
||||
Err(e) => {
|
||||
return Err(format!("failed to re-load host keyring for decryption: {e}").into());
|
||||
|
|
|
|||
Loading…
Reference in a new issue