Struct bonsaidb::server::fabruic::CertificateChain
pub struct CertificateChain(/* private fields */);
Expand description
A public Certificate
chain, used to prese
Implementations§
§impl CertificateChain
impl CertificateChain
pub fn from_certificates<C>(
certificates: C
) -> Result<CertificateChain, CertificateChain>
pub fn from_certificates<C>( certificates: C ) -> Result<CertificateChain, CertificateChain>
Builds a new CertificateChain
from the given Certificate
s and
validates it.
This presumes that Certificate
s are valid, see
Certificate::from_der
.
Errors
TODO: this doesn’t do any validation yet
pub fn unchecked_from_certificates<C>(certificates: C) -> CertificateChain
pub fn unchecked_from_certificates<C>(certificates: C) -> CertificateChain
Builds CertificateChain
from the given Certificate
s. This skips
the validation from from_certificates
,
which isn’t unsafe
, but could fail nonetheless when used on an
Endpoint
.
pub fn into_end_entity_certificate(self) -> Certificate
pub fn into_end_entity_certificate(self) -> Certificate
Returns the end-entity Certificate
.
Panics
If the CertificateChain
is invalid. This can’t happen if validated
through from_certificates
.
pub fn end_entity_certificate(&self) -> &Certificate
pub fn end_entity_certificate(&self) -> &Certificate
Returns a reference to the end-entity Certificate
.
Panics
If the CertificateChain
is invalid. This can’t happen if validated
through from_certificates
.
pub fn iter(&self) -> Iter<'_, Certificate>
pub fn iter(&self) -> Iter<'_, Certificate>
Returns an iterator over the CertificateChain
.
pub fn get(&self, index: usize) -> Option<&Certificate>
pub fn get(&self, index: usize) -> Option<&Certificate>
Provides a reference to the Certificate
at the given index.
Trait Implementations§
§impl Clone for CertificateChain
impl Clone for CertificateChain
§fn clone(&self) -> CertificateChain
fn clone(&self) -> CertificateChain
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for CertificateChain
impl Debug for CertificateChain
§impl<'de> Deserialize<'de> for CertificateChain
impl<'de> Deserialize<'de> for CertificateChain
§fn deserialize<__D>(
__deserializer: __D
) -> Result<CertificateChain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<CertificateChain, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Hash for CertificateChain
impl Hash for CertificateChain
§impl Index<usize> for CertificateChain
impl Index<usize> for CertificateChain
§impl IntoIterator for CertificateChain
impl IntoIterator for CertificateChain
§type IntoIter = IntoIter<<CertificateChain as IntoIterator>::Item>
type IntoIter = IntoIter<<CertificateChain as IntoIterator>::Item>
§type Item = Certificate
type Item = Certificate
§fn into_iter(self) -> <CertificateChain as IntoIterator>::IntoIter
fn into_iter(self) -> <CertificateChain as IntoIterator>::IntoIter
§impl Ord for CertificateChain
impl Ord for CertificateChain
§fn cmp(&self, other: &CertificateChain) -> Ordering
fn cmp(&self, other: &CertificateChain) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for CertificateChain
impl PartialEq for CertificateChain
§fn eq(&self, other: &CertificateChain) -> bool
fn eq(&self, other: &CertificateChain) -> bool
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for CertificateChain
impl PartialOrd for CertificateChain
§fn partial_cmp(&self, other: &CertificateChain) -> Option<Ordering>
fn partial_cmp(&self, other: &CertificateChain) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more§impl Serialize for CertificateChain
impl Serialize for CertificateChain
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
§impl TryFrom<Vec<Certificate>> for CertificateChain
impl TryFrom<Vec<Certificate>> for CertificateChain
§type Error = CertificateChain
type Error = CertificateChain
§fn try_from(
certificates: Vec<Certificate>
) -> Result<CertificateChain, <CertificateChain as TryFrom<Vec<Certificate>>>::Error>
fn try_from( certificates: Vec<Certificate> ) -> Result<CertificateChain, <CertificateChain as TryFrom<Vec<Certificate>>>::Error>
impl Eq for CertificateChain
impl StructuralEq for CertificateChain
impl StructuralPartialEq for CertificateChain
Auto Trait Implementations§
impl RefUnwindSafe for CertificateChain
impl Send for CertificateChain
impl Sync for CertificateChain
impl Unpin for CertificateChain
impl UnwindSafe for CertificateChain
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.