pub fn verify(trust: &Trust, issued_by: &PublicKey, cur_time: Duration) -> Result<(), String> {
        if trust.expires_at < cur_time {
            return Err("Trust in chain is expired.".to_string());
        }

        let msg: &[u8] =
            &Self::metadata_bytes(&trust.issued_for, trust.expires_at, trust.issued_at);

        KeyPair::verify(issued_by, msg, trust.signature.as_slice())?;

        Ok(())
    }
/// Verifies that authorization is cryptographically correct.
Verifies that authorization is cryptographically correct.
Verifies that authorization is cryptographically correct .
pub fn verify(trust: &Trust, issued_by: &PublicKey, cur_time: Duration) -> Result<(), String> {
        if trust.expires_at < cur_time {
            return Err("Trust in chain is expired.".to_string());
        }
        let msg: &[u8] =
            &Self::metadata_bytes(&trust.issued_for, trust.expires_at, trust.issued_at);
        KeyPair::verify(issued_by, msg, trust.signature.as_slice())?;
        Ok(())
    }
pub fn verify ( trust : & Trust , issued_by : & PublicKey , cur_time : Duration ) -> Result < ( ) , String > { if trust . expires_at < cur_time { return Err ( " " . to_string ( ) ) ; } let msg : & [ u8 ] = & Self :: metadata_bytes ( & trust . issued_for , trust . expires_at , trust . issued_at ) ; KeyPair :: verify ( issued_by , msg , trust . signature . as_slice ( ) ) ? ; Ok ( ( ) ) }
Verifies that authorization is cryptographically correct.
Verifies that authorization is cryptographically correct .
trust
&Trust
issued_by
&PublicKey
cur_time
Duration