MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / assert_eq

Method assert_eq

verifier/src/verification.rs:771–801  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

769
770impl Mrs {
771 fn assert_eq(&self, other: &Self) -> Result<()> {
772 if self.mrtd != other.mrtd {
773 bail!(
774 "MRTD mismatch: expected={}, actual={}",
775 hex::encode(&self.mrtd),
776 hex::encode(&other.mrtd)
777 );
778 }
779 if self.rtmr0 != other.rtmr0 {
780 bail!(
781 "RTMR0 mismatch: expected={}, actual={}",
782 hex::encode(&self.rtmr0),
783 hex::encode(&other.rtmr0)
784 );
785 }
786 if self.rtmr1 != other.rtmr1 {
787 bail!(
788 "RTMR1 mismatch: expected={}, actual={}",
789 hex::encode(&self.rtmr1),
790 hex::encode(&other.rtmr1)
791 );
792 }
793 if self.rtmr2 != other.rtmr2 {
794 bail!(
795 "RTMR2 mismatch: expected={}, actual={}",
796 hex::encode(&self.rtmr2),
797 hex::encode(&other.rtmr2)
798 );
799 }
800 Ok(())
801 }
802}

Calls

no outgoing calls

Tested by

no test coverage detected