Lines Matching refs:TrustyKekContext
91 enum TrustyKekContext { enum
96 impl TrustyKekContext { impl
134 Ok(TrustyKekContext::NonLegacyKey(NonLegacyKeyContext { in new()
148 Ok(TrustyKekContext::LegacyKey) in new()
174 0 => Ok(TrustyKekContext::LegacyKey), in from_raw()
186 Ok(TrustyKekContext::NonLegacyKey(NonLegacyKeyContext { in from_raw()
205 TrustyKekContext::LegacyKey => (0, 0, 0u32), in to_raw()
206 TrustyKekContext::NonLegacyKey(ctx) => { in to_raw()
230 let context = TrustyKekContext::from_raw(context)?; in root_kek()
238 TrustyKekContext::NonLegacyKey(context) => { in root_kek()
250 TrustyKekContext::LegacyKey => { in root_kek()
264 TrustyKekContext::new(true, Some(KdfVersion::Best), Some(OsRollbackVersion::Current))? in kek_context()
376 TrustyKekContext::new(true, Some(KdfVersion::Best), Some(OsRollbackVersion::Current)); in kek_with_different_context_return_different_keys()
378 let context1 = TrustyKekContext::from_raw(&context1.unwrap().to_raw().unwrap()).unwrap(); in kek_with_different_context_return_different_keys()
380 TrustyKekContext::NonLegacyKey(context) => context, in kek_with_different_context_return_different_keys()
389 let context2 = TrustyKekContext::new( in kek_with_different_context_return_different_keys()
414 TrustyKekContext::new(true, Some(KdfVersion::Best), Some(OsRollbackVersion::Current)) in legacy_kek_is_different_than_non_legacy()
416 let context2 = TrustyKekContext::new(false, None, None).unwrap(); in legacy_kek_is_different_than_non_legacy()
468 let ctx_1 = TrustyKekContext::from_raw(&[0; 0]); in deserializing_bad_kek_context_fails()
471 TrustyKekContext::new(true, Some(KdfVersion::Best), Some(OsRollbackVersion::Current)) in deserializing_bad_kek_context_fails()
475 let ctx_2 = TrustyKekContext::from_raw(&ctx_raw); in deserializing_bad_kek_context_fails()
478 let ctx_3 = TrustyKekContext::from_raw(&ctx_raw); in deserializing_bad_kek_context_fails()
481 let ctx_4 = TrustyKekContext::from_raw(&ctx_raw); in deserializing_bad_kek_context_fails()
483 let ctx_5 = TrustyKekContext::from_raw(&[0; TrustyKekContext::SERIALIZED_SIZE]); in deserializing_bad_kek_context_fails()
489 let original_ctx = TrustyKekContext::new( in test_kek_context_serialization()
495 let recovered_ctx = TrustyKekContext::from_raw(&original_ctx.to_raw().unwrap()).unwrap(); in test_kek_context_serialization()
497 let original_ctx = TrustyKekContext::new(false, None, None).unwrap(); in test_kek_context_serialization()
498 let recovered_ctx = TrustyKekContext::from_raw(&original_ctx.to_raw().unwrap()).unwrap(); in test_kek_context_serialization()
505 let non_legacy_ctx = TrustyKekContext::new(true, None, Some(OsRollbackVersion::Version(2))); in test_kek_context_creation()
510 let non_legacy_ctx = TrustyKekContext::new(true, Some(KdfVersion::Best), None); in test_kek_context_creation()
515 let non_legacy_ctx = TrustyKekContext::new( in test_kek_context_creation()
522 let legacy_ctx = TrustyKekContext::new( in test_kek_context_creation()
531 let legacy_ctx = TrustyKekContext::new(false, None, Some(OsRollbackVersion::Version(2))); in test_kek_context_creation()
536 let legacy_ctx = TrustyKekContext::new(false, Some(KdfVersion::Best), None); in test_kek_context_creation()
541 let legacy_ctx = TrustyKekContext::new(false, None, None); in test_kek_context_creation()