pub struct Ca { /* private fields */ }Expand description
A private CA, and the certificates it issues.
Implementations§
Source§impl Ca
impl Ca
Sourcepub fn named(common_name: &str) -> Self
pub fn named(common_name: &str) -> Self
A fresh authority with a distinct subject name.
Useful when a test needs two unrelated issuers: giving both authorities the same distinguished name can make a verifier try the trusted authority’s key and report a bad signature instead of the unknown issuer the fixture meant to exercise.
Sourcepub fn issue(&self, sans: &[SanType], common_name: &str) -> (String, String)
pub fn issue(&self, sans: &[SanType], common_name: &str) -> (String, String)
Issue a certificate carrying these subject alternative names and this common name.
The two are separate arguments on purpose: a certificate whose SAN and CN disagree is the case RFC 6125 §6.4.4 exists for, and it cannot be constructed if they are one field.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Ca
impl !UnwindSafe for Ca
impl Freeze for Ca
impl Send for Ca
impl Sync for Ca
impl Unpin for Ca
impl UnsafeUnpin for Ca
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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