pub struct InMemoryAttestor { /* private fields */ }Expand description
In-memory Ed25519 attestor. Used in tests, fixtures, and the bootstrap path before the OS keychain is wired up.
Not suitable for production: the signing key is held in plain process memory. Production paths use one of the OS-keychain backends scaffolded below.
Implementations§
Source§impl InMemoryAttestor
impl InMemoryAttestor
Sourcepub fn from_signing_key(
signing_key: SigningKey,
key_id: impl Into<String>,
) -> Self
pub fn from_signing_key( signing_key: SigningKey, key_id: impl Into<String>, ) -> Self
Wrap a pre-existing signing key with an explicit key_id.
Trait Implementations§
Source§impl Attestor for InMemoryAttestor
impl Attestor for InMemoryAttestor
Source§fn sign(&self, signing_input: &[u8]) -> Signature
fn sign(&self, signing_input: &[u8]) -> Signature
Sign the canonical signing input bytes. Read more
Source§fn key_id(&self) -> &str
fn key_id(&self) -> &str
Stable fingerprint of the public verifying key. Embedded into every
attestation preimage and matched on verify (see
VerifyError::KeyIdMismatch).Source§fn verifying_key(&self) -> VerifyingKey
fn verifying_key(&self) -> VerifyingKey
The verifying key for this attestor — exposed so test harnesses and
cortex audit verify can reconstruct the public side without going
through OS-specific lookup. OS-keychain backends MUST publish the
public key alongside the private key (see ADR 0010 §3).Source§impl Debug for InMemoryAttestor
impl Debug for InMemoryAttestor
Source§impl IdentityRotation for InMemoryAttestor
impl IdentityRotation for InMemoryAttestor
Source§fn sign_rotation(
&self,
new_pubkey: &VerifyingKey,
signed_at: DateTime<Utc>,
) -> RotationEnvelopewhere
Self: Sized,
fn sign_rotation(
&self,
new_pubkey: &VerifyingKey,
signed_at: DateTime<Utc>,
) -> RotationEnvelopewhere
Self: Sized,
Sign a rotation envelope
(old → new) using the old key
material. See sign_rotation for the free-function form.Auto Trait Implementations§
impl Freeze for InMemoryAttestor
impl RefUnwindSafe for InMemoryAttestor
impl Send for InMemoryAttestor
impl Sync for InMemoryAttestor
impl Unpin for InMemoryAttestor
impl UnsafeUnpin for InMemoryAttestor
impl UnwindSafe for InMemoryAttestor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more