KeyUsagePolicy

Trait KeyUsagePolicy 

Source
pub trait KeyUsagePolicy {
    // Required method
    fn check_key_usage(
        &mut self,
        key_id: &[u8; 32],
        operation: Operation,
        context: Option<&HashMap<String, String>>,
    ) -> Result<(), PolicyViolation>;
}
Expand description

Trait for objects that can enforce key usage policies

Required Methods§

Source

fn check_key_usage( &mut self, key_id: &[u8; 32], operation: Operation, context: Option<&HashMap<String, String>>, ) -> Result<(), PolicyViolation>

Check if a key operation is allowed

Implementors§