feat(kernel): implement generation-based capability revocation with proofs and tests
This commit is contained in:
@@ -13,4 +13,9 @@ impl Generation {
|
||||
pub fn is_valid_against(&self, current: &Generation) -> bool {
|
||||
self == current
|
||||
}
|
||||
|
||||
#[cfg(kani)]
|
||||
pub fn from_raw(value: u32) -> Self {
|
||||
Self(value)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,6 @@ pub mod generation;
|
||||
pub mod id;
|
||||
pub mod macros;
|
||||
pub mod permission;
|
||||
#[cfg(kani)]
|
||||
pub mod proofs;
|
||||
pub mod time;
|
||||
|
||||
@@ -40,4 +40,9 @@ impl PermissionSet {
|
||||
pub fn is_subset_of(&self, other: &PermissionSet) -> bool {
|
||||
self.0 & other.0 == self.0
|
||||
}
|
||||
|
||||
#[cfg(kani)]
|
||||
pub fn from_bits(bits: u8) -> Self {
|
||||
PermissionSet(bits)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user