• Home
  • Raw
  • Download

Lines Matching refs:blob

489         let blob = Self::new_from_stream(&mut stream).context(ks_err!())?;  in new_from_stream_decrypt_with()  localVariable
491 match blob.value() { in new_from_stream_decrypt_with()
493 flags: blob.flags, in new_from_stream_decrypt_with()
497 flags: blob.flags, in new_from_stream_decrypt_with()
503 flags: blob.flags, in new_from_stream_decrypt_with()
509 _ => Ok(blob), in new_from_stream_decrypt_with()
633 fn decrypt_if_required(super_key: &Option<Arc<dyn AesGcm>>, blob: Blob) -> Result<Blob> { in decrypt_if_required()
634 match blob { in decrypt_if_required()
638 | Blob { value: BlobValue::Decrypted(_), .. } => Ok(blob), in decrypt_if_required()
698 let blob = Self::read_generic_blob(&self.make_chr_filename(uid, alias, prefix)) in read_characteristics_file() localVariable
701 let blob = match blob { in read_characteristics_file() localVariable
703 Some(blob) => blob, in read_characteristics_file()
706 let blob = Self::decrypt_if_required(super_key, blob) in read_characteristics_file() localVariable
709 let (mut stream, is_cache) = match blob.value() { in read_characteristics_file()
718 let hw_list = match blob.value() { in read_characteristics_file()
762 let (blob, prefix) = loop { in read_km_blob_file()
764 if let Some(blob) = in read_km_blob_file()
768 break (blob, prefix); in read_km_blob_file()
775 Ok(Some((blob, prefix.to_string()))) in read_km_blob_file()
820 let blob = Self::read_generic_blob_decrypt_with(&path, decrypt) in read_legacy_keystore_entry() localVariable
823 Ok(blob.and_then(|blob| match blob.value { in read_legacy_keystore_entry()
824 BlobValue::Generic(blob) => Some(blob), in read_legacy_keystore_entry()
1270 let user_cert = if let Some(blob) = user_cert_blob { in load_by_uid_alias()
1271 let blob = Self::decrypt_if_required(super_key, blob) in load_by_uid_alias() localVariable
1274 if let Blob { value: BlobValue::Generic(data), .. } = blob { in load_by_uid_alias()
1287 let ca_cert = if let Some(blob) = ca_cert_blob { in load_by_uid_alias()
1288 let blob = Self::decrypt_if_required(super_key, blob) in load_by_uid_alias() localVariable
1291 if let Blob { value: BlobValue::Generic(data), .. } = blob { in load_by_uid_alias()
1312 let blob = Self::read_generic_blob(&path).context(ks_err!("While loading super key."))?; in load_super_key() localVariable
1314 let blob = match blob { in load_super_key() localVariable
1315 Some(blob) => match blob { in load_super_key()
1321 let blob = aes_gcm_decrypt(&data, &iv, &tag, &key) in load_super_key() localVariable
1323 Some(blob) in load_super_key()
1337 Ok(blob) in load_super_key()
1379 pub fn prepare_blob(blob: Blob, key: &[u8]) -> Result<Blob> { in prepare_blob()
1380 match blob { in prepare_blob()
1381 Blob { value: BlobValue::Generic(data), flags } if blob.is_encrypted() => { in prepare_blob()
1385 Blob { value: BlobValue::Characteristics(data), flags } if blob.is_encrypted() => { in prepare_blob()
1392 Blob { value: BlobValue::Decrypted(data), flags } if blob.is_encrypted() => { in prepare_blob()
1397 if !blob.is_encrypted() => in prepare_blob()
1403 if !blob.is_encrypted() => in prepare_blob()
1409 if !blob.is_encrypted() => in prepare_blob()
1414 _ => Ok(blob), in prepare_blob()
1433 pub fn write_legacy_blob(out: &mut dyn Write, blob: Blob) -> Result<usize> { in write_legacy_blob()
1434 let (header, data, salt) = match blob { in write_legacy_blob()
1597 let blob = in make_encrypted_characteristics_file() localVariable
1599 let blob = prepare_blob(blob, key).unwrap(); in make_encrypted_characteristics_file() localVariable
1600 write_legacy_blob(&mut file, blob).unwrap(); in make_encrypted_characteristics_file()
1611 let blob = Blob { value: BlobValue::Generic(data.to_vec()), flags: flags::ENCRYPTED }; in make_encrypted_usr_cert_file() localVariable
1612 let blob = prepare_blob(blob, key).unwrap(); in make_encrypted_usr_cert_file() localVariable
1613 write_legacy_blob(&mut file, blob).unwrap(); in make_encrypted_usr_cert_file()
1624 let blob = Blob { value: BlobValue::Generic(data.to_vec()), flags: flags::ENCRYPTED }; in make_encrypted_ca_cert_file() localVariable
1625 let blob = prepare_blob(blob, key).unwrap(); in make_encrypted_ca_cert_file() localVariable
1626 write_legacy_blob(&mut file, blob).unwrap(); in make_encrypted_ca_cert_file()
1633 let blob = Blob { in make_encrypted_key_file() localVariable
1637 let blob = prepare_blob(blob, key).unwrap(); in make_encrypted_key_file() localVariable
1638 write_legacy_blob(&mut file, blob).unwrap(); in make_encrypted_key_file()
1645 let blob = Blob { value: BlobValue::Generic(data.to_vec()), flags: 0 }; in make_cert_blob_file() localVariable
1646 let blob = prepare_blob(blob, &[]).unwrap(); in make_cert_blob_file() localVariable
1647 write_legacy_blob(&mut file, blob).unwrap(); in make_cert_blob_file()