pub struct HostKey { /* private fields */ }Expand description
The host’s record-seal key pair. Only the mur process holds one.
ring keeps the expanded key in its own type, which does not zeroize on drop; the seed it was
built from is zeroized as soon as the key pair exists.
Implementations§
Source§impl HostKey
impl HostKey
Sourcepub fn load_or_create(murmur_home: &Path) -> Result<Arc<HostKey>, String>
pub fn load_or_create(murmur_home: &Path) -> Result<Arc<HostKey>, String>
The key under murmur_home, created on first use.
Ensures keys/ at 0700; opens the seed without following a link and refuses a file that
is not regular, not owned by this user, or carries any group or other bit; creates a
missing one from fresh randomness under a temporary name linked into place, so two racing
first launches end with one key; and writes record-seal.pub when it is missing or does
not match. The Err names the file and the reason, never a byte of the key.
pub fn public_key(&self) -> &PublicKey
pub fn key_id(&self) -> &str
Trait Implementations§
Auto Trait Implementations§
impl Forget for HostKey
impl Freeze for HostKey
impl Move for HostKey
impl RefUnwindSafe for HostKey
impl Send for HostKey
impl Sync for HostKey
impl Unpin for HostKey
impl UnsafeUnpin for HostKey
impl UnwindSafe for HostKey
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more