Skip to content

Commit

Permalink
lib/dice: remove dead traits
Browse files Browse the repository at this point in the history
These traits are newly detected as dead by the new toolchain, so after
discussion with @flihp I'm removing them -- we can always get them out
of git if we need them.
  • Loading branch information
cbiffle committed Apr 4, 2024
1 parent 4303eb3 commit 43ba9e2
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions lib/dice/src/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,6 @@ pub trait Cert: AsBytes {
}
}

pub trait IssuerCnCert: Cert {
const ISSUER_CN_RANGE: Range<usize>;

fn get_issuer_cn(&self) -> PlatformId {
PlatformId::try_from(self.get_range::<&[u8]>(Self::ISSUER_CN_RANGE))
.unwrap_lite()
}
}

pub trait SubjectCnCert: Cert {
const SUBJECT_CN_RANGE: Range<usize>;

fn get_subject_cn(&self) -> PlatformId {
PlatformId::try_from(self.get_range::<&[u8]>(Self::SUBJECT_CN_RANGE))
.unwrap_lite()
}
}

/// Trait for Certs with the TCG DICE TcbInfo structure w/ the FWID member.
pub trait FwidCert: Cert {
const FWID_RANGE: Range<usize>;
Expand Down

0 comments on commit 43ba9e2

Please sign in to comment.