pub enum SeedTls {
WebPki,
PinnedSha256([u8; 32]),
PinnedSpki([u8; 32]),
}Expand description
How an https:// Seed is authenticated.
Variants§
WebPki
Public-CA verification (a Seed behind a CA-issued certificate).
PinnedSha256([u8; 32])
Accept exactly the leaf certificate with this SHA-256 (DER).
PinnedSpki([u8; 32])
Accept any leaf certificate whose SubjectPublicKeyInfo (DER) has this SHA-256. Survives certificate renewal under the same key.
Implementations§
Source§impl SeedTls
impl SeedTls
Sourcepub fn pinned(fingerprint: &str) -> Result<Self, RuntimeError>
pub fn pinned(fingerprint: &str) -> Result<Self, RuntimeError>
Parse sha256:<64 hex> (colons between byte pairs allowed, as
openssl x509 -fingerprint -sha256 prints them).
Sourcepub fn pinned_spki(fingerprint: &str) -> Result<Self, RuntimeError>
pub fn pinned_spki(fingerprint: &str) -> Result<Self, RuntimeError>
Parse spki-sha256:<64 hex> (colons between byte pairs allowed).
Sourcepub fn spki_fingerprint(der: &[u8]) -> Option<String>
pub fn spki_fingerprint(der: &[u8]) -> Option<String>
spki-sha256:<hex> of a DER certificate’s public key (for
recording a pin). None if the certificate does not parse.
Sourcepub fn fingerprint(der: &[u8]) -> String
pub fn fingerprint(der: &[u8]) -> String
sha256:<hex> of a DER certificate (for recording a pin).
Trait Implementations§
impl Eq for SeedTls
impl StructuralPartialEq for SeedTls
Auto Trait Implementations§
impl Freeze for SeedTls
impl RefUnwindSafe for SeedTls
impl Send for SeedTls
impl Sync for SeedTls
impl Unpin for SeedTls
impl UnsafeUnpin for SeedTls
impl UnwindSafe for SeedTls
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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